Skip to content

rrezartprebreza/spring-boot-skills / skills/spring-boot-3/flyway-migrations

flyway-migrations

Verified

Use when creating database migrations, schema changes, seed data, or any SQL that modifies database structure. Covers Flyway naming conventions, versioning, and safe migration patterns.

examples/bad-migration.sql

View on GitHub
-- BAD — V4_add_column.sql (single underscore — Flyway won't recognize this!)

-- Adding NOT NULL column without default — fails on tables with existing rows
ALTER TABLE orders ADD COLUMN shipping_address TEXT NOT NULL;

-- Direct column rename — breaks application code during rolling deploy
ALTER TABLE orders RENAME COLUMN full_name TO customer_name;

-- Creating index without CONCURRENTLY — locks entire table on PostgreSQL
CREATE INDEX idx_orders_status ON orders (status);

-- Seed data in migration — should be in @Profile("dev") seeder or R__ repeatable migration
INSERT INTO orders (id, customer_email, status)
VALUES ('550e8400-e29b-41d4-a716-446655440000', 'test@example.com', 'PENDING');

-- Modifying a previously-run migration (V2) to "fix" it
-- NEVER do this — Flyway checksums will fail in all deployed environments
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall