unified-storage: sqlkv migrations (#114790)

* unified-storage: create resource_events table and add key_path column to resource_history

* Update resource_history_insert template

* update test snapshots

* use latin encoding for key_path and bump size to 2048
This commit is contained in:
Will Assis
2025-12-04 09:21:17 -05:00
committed by GitHub
parent c88314296b
commit 994e1dd58f
6 changed files with 30 additions and 8 deletions
@@ -185,5 +185,18 @@ func initResourceTables(mg *migrator.Migrator) string {
Name: "UQE_resource_last_import_time_last_import_time",
}))
mg.AddMigration("Add key_path column to resource_history", migrator.NewAddColumnMigration(resource_history_table, &migrator.Column{
Name: "key_path", Type: migrator.DB_NVarchar, Length: 2048, Nullable: false, Default: "", IsLatin: true,
}))
resource_events_table := migrator.Table{
Name: "resource_events",
Columns: []*migrator.Column{
{Name: "key_path", Type: migrator.DB_NVarchar, Length: 2048, Nullable: false, IsPrimaryKey: true, IsLatin: true},
{Name: "value", Type: migrator.DB_MediumText, Nullable: false},
},
}
mg.AddMigration("create table "+resource_events_table.Name, migrator.NewAddTableMigration(resource_events_table))
return marker
}