Merge pull request #11867 from grafana/11862_migration

decrease length of auth_id column in user_auth table
This commit is contained in:
Marcus Efraimsson 2018-05-08 13:10:22 +02:00 committed by GitHub
commit 219118ef4a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,8 @@ func addUserAuthMigrations(mg *Migrator) {
// add indices
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;").
Postgres("ALTER TABLE user_auth ALTER COLUMN auth_id TYPE VARCHAR(255);").
Mysql("ALTER TABLE user_auth MODIFY auth_id VARCHAR(255);"))
Postgres("ALTER TABLE user_auth ALTER COLUMN auth_id TYPE VARCHAR(190);").
Mysql("ALTER TABLE user_auth MODIFY auth_id VARCHAR(190);"))
}