Commit 8ed79d61 by Marcus Efraimsson

decrease length of auth_id column in user_auth table

certain mysql versions don't support having indices with a greater varchar length
than 190.
parent 8f0c8005
...@@ -22,8 +22,8 @@ func addUserAuthMigrations(mg *Migrator) { ...@@ -22,8 +22,8 @@ func addUserAuthMigrations(mg *Migrator) {
// add indices // add indices
addTableIndicesMigrations(mg, "v1", userAuthV1) addTableIndicesMigrations(mg, "v1", userAuthV1)
mg.AddMigration("alter user_auth.auth_id to length 255", new(RawSqlMigration). mg.AddMigration("alter user_auth.auth_id to length 190", new(RawSqlMigration).
Sqlite("SELECT 0 WHERE 0;"). Sqlite("SELECT 0 WHERE 0;").
Postgres("ALTER TABLE user_auth ALTER COLUMN auth_id TYPE VARCHAR(255);"). Postgres("ALTER TABLE user_auth ALTER COLUMN auth_id TYPE VARCHAR(190);").
Mysql("ALTER TABLE user_auth MODIFY auth_id VARCHAR(255);")) Mysql("ALTER TABLE user_auth MODIFY auth_id VARCHAR(190);"))
} }
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