Skip to content

migrations: Organize migration files into directories

Administrator requested to merge ef/hierarchical-migrations into main

Created by: efritz

Pulled from #29831. This PR updates migrations to be a pair of up/down files to a rigidly-structured directories where we can add more metadata and migration-specific docs (that are eventually gc'd on squash). This PR also:

  • updates the internal/database/migration/definitions package to read from directories
  • updates sg migration {add,squash} to generate the new format
  • updates the go-backcompat check to work ensure we can still test on commits with flat-listed definitions (for now)

Reviewers: Please review by-commit. Commits that rewrite migrations were done mechanically with the temporary scripts added + removed in this PR.

Merge request reports

Loading