Revert "Unistore : Ensure Watch works in HA mode." (#94097)
Revert "Unistore : Ensure Watch works in HA mode. (#93428)"
This reverts commit 0a26c9e9ae.
This commit is contained in:
@@ -10,7 +10,8 @@ func initResourceTables(mg *migrator.Migrator) string {
|
||||
marker := "Initialize resource tables"
|
||||
mg.AddMigration(marker, &migrator.RawSQLMigration{})
|
||||
|
||||
resource_table := migrator.Table{
|
||||
tables := []migrator.Table{}
|
||||
tables = append(tables, migrator.Table{
|
||||
Name: "resource",
|
||||
Columns: []*migrator.Column{
|
||||
// primary identifier
|
||||
@@ -32,8 +33,9 @@ func initResourceTables(mg *migrator.Migrator) string {
|
||||
Indices: []*migrator.Index{
|
||||
{Cols: []string{"namespace", "group", "resource", "name"}, Type: migrator.UniqueIndex},
|
||||
},
|
||||
}
|
||||
resource_history_table := migrator.Table{
|
||||
})
|
||||
|
||||
tables = append(tables, migrator.Table{
|
||||
Name: "resource_history",
|
||||
Columns: []*migrator.Column{
|
||||
// primary identifier
|
||||
@@ -60,9 +62,7 @@ func initResourceTables(mg *migrator.Migrator) string {
|
||||
// index to support watch poller
|
||||
{Cols: []string{"resource_version"}, Type: migrator.IndexType},
|
||||
},
|
||||
}
|
||||
|
||||
tables := []migrator.Table{resource_table, resource_history_table}
|
||||
})
|
||||
|
||||
// tables = append(tables, migrator.Table{
|
||||
// Name: "resource_label_set",
|
||||
@@ -97,13 +97,5 @@ func initResourceTables(mg *migrator.Migrator) string {
|
||||
}
|
||||
}
|
||||
|
||||
mg.AddMigration("Add column previous_resource_version in resource_history", migrator.NewAddColumnMigration(resource_history_table, &migrator.Column{
|
||||
Name: "previous_resource_version", Type: migrator.DB_BigInt, Nullable: false,
|
||||
}))
|
||||
|
||||
mg.AddMigration("Add column previous_resource_version in resource", migrator.NewAddColumnMigration(resource_table, &migrator.Column{
|
||||
Name: "previous_resource_version", Type: migrator.DB_BigInt, Nullable: false,
|
||||
}))
|
||||
|
||||
return marker
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user