Commit 4ce5a36d authored by Bobby Rullo's avatar Bobby Rullo

db: initialize bigint, boolean columns

gorp hates nil.
parent 6798adc6
-- +migrate Up
ALTER TABLE client_identity ADD COLUMN "dex_admin" boolean;
UPDATE "client_identity" SET "dex_admin" = false;
-- +migrate Up
ALTER TABLE authd_user ADD COLUMN "created_at" bigint;
UPDATE authd_user SET "created_at" = 0;
This diff is collapsed.
......@@ -22,6 +22,8 @@ func initDB(dsn string) *gorp.DbMap {
panic(fmt.Sprintf("Unable to drop migration table: %v", err))
}
db.MigrateToLatest(c)
if _, err = db.MigrateToLatest(c); err != nil {
panic(fmt.Sprintf("Unable to migrate: %v", err))
}
return c
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment