Correlations: Migrate config type to root (#91855)

* WIP

* Validate new field, and add value in provisioning if not defined in correct spot

* Simplify logic, use correct value

* fix tests

* Fix linter errors

* fix swagger and tests

* 😬

* Auto-generation isnt doing this..

* Fix linter

* test if nullable is the issue…

* Change structure on the frontend fields

* Try with backtick

* try programatic quoting

* Try only quote non-ints

* quoting, no backticks

* Remove debugging
This commit is contained in:
Kristina
2024-08-26 08:02:48 -05:00
committed by GitHub
parent 84e5c3af22
commit 1dd830b9f1
21 changed files with 114 additions and 113 deletions
@@ -38,7 +38,6 @@ func addCorrelationsMigrations(mg *Migrator) {
// All existing records will have '0' assigned
{Name: "org_id", Type: DB_BigInt, IsPrimaryKey: true, Default: "0"},
{Name: "source_uid", Type: DB_NVarchar, Length: 40, Nullable: false, IsPrimaryKey: true},
// Nullable because in the future we want to have correlations to external resources
{Name: "target_uid", Type: DB_NVarchar, Length: 40, Nullable: true},
{Name: "label", Type: DB_Text, Nullable: false},
{Name: "description", Type: DB_Text, Nullable: false},
@@ -63,4 +62,8 @@ func addCorrelationsMigrations(mg *Migrator) {
mg.AddMigration("add provisioning column", NewAddColumnMigration(correlationsV2, &Column{
Name: "provisioned", Type: DB_Bool, Nullable: false, Default: "0",
}))
mg.AddMigration("add type column", NewAddColumnMigration(correlationsV2, &Column{
Name: "type", Type: DB_NVarchar, Length: 40, Nullable: false, Default: "'query'",
}))
}