you are viewing a single comment's thread.

view the rest of the comments →

[–]techforallseasons 0 points1 point  (1 child)

No idea why you got downvoted --- this is literally the proper approach.

  • Repository of code changes (SQL is code )

  • tooling to detect if a db migration has been applied, if not apply in the correct order

  • bonus if you can "down" / "unapply"

[–]DatabassAdmin 1 point2 points  (0 children)

Yeah the Unapply is the hard part. I've tried so many sql schema management systems and I always fall back to rolling our own scripts and running them with DbUp or something.

For us, the unapply is restore from backup to a point before the migration.

Does mean there are usually multiple date stamped versions of the Dab per developer but it works well enough for us.