SQLStore: Add deprecation comments for breaking migrations (#49740)

* Migrator: Extend support to rename columns

* SQLStore: Add deprecation comments for breaking migrations
This commit is contained in:
Joan López de la Franca Beltran
2022-06-03 17:42:08 +02:00
committed by GitHub
parent 36c3398c6d
commit 5f1305d280
5 changed files with 35 additions and 21 deletions
@@ -20,6 +20,8 @@ func addTableIndicesMigrations(mg *Migrator, versionSuffix string, table Table)
}
}
// addTableRenameMigration may cause breaking changes.
// DEPRECATED: It should no longer be used. Kept only for legacy reasons.
func addTableRenameMigration(mg *Migrator, oldName string, newName string, versionSuffix string) {
migrationId := fmt.Sprintf("Rename table %s to %s - %s", oldName, newName, versionSuffix)
mg.AddMigration(migrationId, NewRenameTableMigration(oldName, newName))