Add SQL migration for user table refactor and endpoint specifications: Rename 'user_temp' to 'user', drop and add foreign key constraints, and introduce 'endpointSpecSwarm' column in multiple tables. Update journal and snapshot metadata for migration 0120_lame_captain_midlands.

This commit is contained in:
Mauricio Siu
2025-11-08 14:09:26 -06:00
parent 785172fa7b
commit fb2bb99a2c
3 changed files with 10 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ ALTER TABLE "schedule" DROP CONSTRAINT "schedule_userId_user_temp_id_fk";
--> statement-breakpoint
ALTER TABLE "session_temp" DROP CONSTRAINT "session_temp_user_id_user_temp_id_fk";
--> statement-breakpoint
ALTER TABLE "application" ADD COLUMN "endpointSpecSwarm" json;--> statement-breakpoint
ALTER TABLE "mariadb" ADD COLUMN "endpointSpecSwarm" json;--> statement-breakpoint
ALTER TABLE "mongo" ADD COLUMN "endpointSpecSwarm" json;--> statement-breakpoint
ALTER TABLE "mysql" ADD COLUMN "endpointSpecSwarm" json;--> statement-breakpoint

View File

@@ -1,5 +1,5 @@
{
"id": "9c8296a5-d294-41bc-bd12-4148f8404483",
"id": "bbe005b3-d5e0-4e93-8305-ba3b9a2e3f3d",
"prevId": "fb4a3ed9-c58b-4a79-a4ee-2a7a4d3914a7",
"version": "7",
"dialect": "postgresql",
@@ -1288,6 +1288,12 @@
"primaryKey": false,
"notNull": false
},
"endpointSpecSwarm": {
"name": "endpointSpecSwarm",
"type": "json",
"primaryKey": false,
"notNull": false
},
"replicas": {
"name": "replicas",
"type": "integer",

View File

@@ -845,8 +845,8 @@
{
"idx": 120,
"version": "7",
"when": 1762631795680,
"tag": "0120_dizzy_chat",
"when": 1762632540024,
"tag": "0120_lame_captain_midlands",
"breakpoints": true
}
]