[management] add gorm tag for primary key for the networks objects (#3758)

This commit is contained in:
Pascal Fischer
2025-05-04 20:58:04 +02:00
committed by GitHub
parent 12f883badf
commit 055df9854c
9 changed files with 63 additions and 7 deletions

View File

@@ -315,6 +315,15 @@ func getMigrations(ctx context.Context) []migrationFunc {
func(db *gorm.DB) error {
return migration.MigrateNewField[routerTypes.NetworkRouter](ctx, db, "enabled", true)
},
func(db *gorm.DB) error {
return migration.DropIndex[networkTypes.Network](ctx, db, "idx_networks_id")
},
func(db *gorm.DB) error {
return migration.DropIndex[resourceTypes.NetworkResource](ctx, db, "idx_network_resources_id")
},
func(db *gorm.DB) error {
return migration.DropIndex[routerTypes.NetworkRouter](ctx, db, "idx_network_routers_id")
},
}
}