10 Database Migration Anti-Patterns and What to Do Instead
Editing applied migrations, environment-specific scripts, ORM auto-DDL in production, untested rollbacks: ten habits that break deployments, with a fix for each.
Flyway, Liquibase, Prisma, Django, EF Core and the rest: how each tool works and how to use it well.
Editing applied migrations, environment-specific scripts, ORM auto-DDL in production, untested rollbacks: ten habits that break deployments, with a fix for each.
How Diesel manages a schema in Rust: the CLI, timestamped folders with up.sql and down.sql, the versions table, the generated schema.rs and embedded migrations.
Doctrine Migrations in Symfony from setup to deploy: diff versus generate, the Version class, the versions table, reviewing generated SQL and running safely.
How Active Record migrations work, what schema.rb cannot express, when to switch to structure.sql, and how db:prepare and strong_migrations keep a team safe.
Practical rules for Laravel migrations in a team: one change per file, constrained foreign keys, frozen history, schema dumps, safe production runs and tests.
DbUp runs plain SQL scripts once and journals them; FluentMigrator describes changes in C#. How each works, where each wins, and how both sit next to EF Core.
How Sqitch plans, deploys, reverts and verifies database changes with named dependencies instead of version numbers, and when it is worth the learning curve.
Four Go migration tools compared: file layouts, how each records applied versions, checksums, embedding in Go binaries, database support and where each fits.
What dotnet ef migrations add generates, how to apply migrations with database update, idempotent scripts and bundles, and surviving model snapshot conflicts.
How Alembic autogenerate compares SQLAlchemy metadata with the live database, the changes it cannot see, constraint naming conventions and SQLite batch mode.
TypeORM migrations in practice: DataSource setup, generate versus create, running TypeScript migrations, migrationsRun, and why synchronize is unsafe in production.
What Django migration files contain, how dependencies and RunPython work, when to squash, how to check migrations in CI, and the traps that catch teams.
How Drizzle migrations work: drizzle-kit generate, the SQL files, snapshots and meta/_journal.json, applying them with migrate, and when to use push instead.
Liquibase accepts XML, YAML, JSON and formatted SQL changelogs. The same table in each format, how include and includeAll work, and which format fits which team.
How five Node.js tools write, track and run database migrations, with a real migration file for each, a comparison table and advice on which one fits your project.
How Flyway names and orders migrations: the V, R and U prefixes, version separators, checksums, repair, outOfOrder and baseline, plus the mistakes that bite.
How Prisma Migrate works: the migrations folder layout, migrate dev versus migrate deploy, the shadow database, drift detection and baselining an existing database.
A practical comparison of Flyway and Liquibase: migration model, file formats, rollback, checksums and validation, integrations, and a decision guide for teams.
One HTTP call with your migration files, one poll, one SVG. Free while we build it.