github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/internal/datastore/mysql/migrations/zz_migration.0006_convert_definitions_to_longblob.go (about) 1 package migrations 2 3 import "fmt" 4 5 func convertNamespaceDefinitionToLongBlob(t *tables) string { 6 return fmt.Sprintf(`ALTER TABLE %s 7 MODIFY serialized_config LONGBLOB NOT NULL;`, 8 t.Namespace(), 9 ) 10 } 11 12 func convertCaveatDefinitionToLongBlob(t *tables) string { 13 return fmt.Sprintf(`ALTER TABLE %s 14 MODIFY definition LONGBLOB NOT NULL;`, 15 t.Caveat(), 16 ) 17 } 18 19 func init() { 20 mustRegisterMigration("longblob_definitions", "extend_object_id", noNonatomicMigration, 21 newStatementBatch( 22 convertNamespaceDefinitionToLongBlob, 23 convertCaveatDefinitionToLongBlob, 24 ).execute, 25 ) 26 }