SQLStore: Prevent migration_id duplicates (#47774)

* SQLStore: Prevent migration_id duplicates

* Migrations: Remove non-executed migration (duplicated id)

Co-authored-by: Leonard Gram <leo@xlson.com>
This commit is contained in:
Joan López de la Franca Beltran
2022-06-04 01:59:49 +02:00
committed by GitHub
co-authored by Leonard Gram
parent 12ba2d6b8b
commit 219e848e73
2 changed files with 13 additions and 26 deletions
@@ -75,26 +75,6 @@ func addDataSourceMigration(mg *Migrator) {
// add v2 indíces
addTableIndicesMigrations(mg, "v2", tableV2)
//------- copy data from v1 to v2 -------------------
mg.AddMigration("copy data_source v1 to v2", NewCopyTableDataMigration("data_source", "data_source_v1", map[string]string{
"id": "id",
"org_id": "account_id",
"version": "version",
"type": "type",
"name": "name",
"access": "access",
"url": "url",
"user": "user",
"password": "password",
"database": "database",
"basic_auth": "basic_auth",
"basic_auth_user": "basic_auth_user",
"basic_auth_password": "basic_auth_password",
"is_default": "is_default",
"created": "created",
"updated": "updated",
}))
mg.AddMigration("Drop old table data_source_v1 #2", NewDropTableMigration("data_source_v1"))
// add column to activate withCredentials option