CloudMigrations: increase size of resource_uid column (#95684)

* len 255

* comment

* Update pkg/services/sqlstore/migrations/cloud_migrations.go

* comment on sqlite

* postgres varchar

---------

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
This commit is contained in:
Dana Axinte 2024-11-01 05:09:50 -04:00 committed by GitHub
parent 9c16622160
commit 2ba1740698
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -176,4 +176,10 @@ func addCloudMigrationsMigrations(mg *Migrator) {
Type: DB_Text, Type: DB_Text,
Nullable: true, Nullable: true,
})) }))
// -- increase the length of resource_uid column
// -- not needed in sqlite as type is TEXT with length defined by SQLITE_MAX_LENGTH preprocessor macro
mg.AddMigration("increase resource_uid column length", NewRawSQLMigration("").
Mysql("ALTER TABLE cloud_migration_resource MODIFY resource_uid NVARCHAR(255);").
Postgres("ALTER TABLE cloud_migration_resource ALTER COLUMN resource_uid TYPE VARCHAR(255);"))
} }