account -> org table migration is starting to work, need to test mysql and postgres

This commit is contained in:
Torkel Ödegaard
2015-02-24 18:32:29 +01:00
parent ed68a4bb9a
commit f3f79792ab
7 changed files with 40 additions and 90 deletions

View File

@@ -55,7 +55,7 @@ func addOrgMigrations(mg *Migrator) {
"name": "name",
"created": "created",
"updated": "updated",
}))
}).IfTableExists("account"))
mg.AddMigration("copy data account_user to org_user", NewCopyTableDataMigration("org_user", "account_user", map[string]string{
"id": "id",
@@ -64,7 +64,7 @@ func addOrgMigrations(mg *Migrator) {
"role": "role",
"created": "created",
"updated": "updated",
}))
}).IfTableExists("account_user"))
mg.AddMigration("Drop old table account", NewDropTableMigration("account"))
mg.AddMigration("Drop old table account_user", NewDropTableMigration("account_user"))