feat: create new character table and migrate data from existing character table
All checks were successful
Build Docker Image / build (push) Successful in 1m17s
All checks were successful
Build Docker Image / build (push) Successful in 1m17s
This commit is contained in:
29
drizzle/0007_gray_shinko_yamashiro.sql
Normal file
29
drizzle/0007_gray_shinko_yamashiro.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_character` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`name` text NOT NULL,
|
||||
`gender` text,
|
||||
`age` integer,
|
||||
`affiliations` text,
|
||||
`devilFruitId` text,
|
||||
`hakiObservation` integer DEFAULT false,
|
||||
`hakiArmament` integer DEFAULT false,
|
||||
`hakiConqueror` integer DEFAULT false,
|
||||
`bounty` integer DEFAULT 0,
|
||||
`height` real,
|
||||
`origin` text,
|
||||
`firstAppearance` integer NOT NULL,
|
||||
`pictureUrl` text,
|
||||
`epithets` text,
|
||||
`status` text,
|
||||
`arcId` text,
|
||||
`url` text,
|
||||
`isInDailyMode` integer DEFAULT false,
|
||||
FOREIGN KEY (`devilFruitId`) REFERENCES `devilFruit`(`id`) ON UPDATE no action ON DELETE no action,
|
||||
FOREIGN KEY (`arcId`) REFERENCES `arc`(`id`) ON UPDATE no action ON DELETE no action
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_character`("id", "name", "gender", "age", "affiliations", "devilFruitId", "hakiObservation", "hakiArmament", "hakiConqueror", "bounty", "height", "origin", "firstAppearance", "pictureUrl", "epithets", "status", "arcId", "url", "isInDailyMode") SELECT "id", "name", "gender", "age", "affiliations", "devilFruitId", "hakiObservation", "hakiArmament", "hakiConqueror", "bounty", "height", "origin", "firstAppearance", "pictureUrl", "epithets", "status", "arcId", "url", "isInDailyMode" FROM `character`;--> statement-breakpoint
|
||||
DROP TABLE `character`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_character` RENAME TO `character`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;
|
||||
1173
drizzle/meta/0007_snapshot.json
Normal file
1173
drizzle/meta/0007_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -50,6 +50,13 @@
|
||||
"when": 1772562364830,
|
||||
"tag": "0006_premium_mesmero",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 7,
|
||||
"version": "6",
|
||||
"when": 1772735982970,
|
||||
"tag": "0007_gray_shinko_yamashiro",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export const character = sqliteTable('character', {
|
||||
status: text('status').$type<Status | null>(),
|
||||
arcId: text('arcId').references(() => arc.id),
|
||||
url: text('url'),
|
||||
isInDailyMode: integer('isInDailyMode', { mode: 'boolean' }).default(true)
|
||||
isInDailyMode: integer('isInDailyMode', { mode: 'boolean' }).default(false)
|
||||
});
|
||||
|
||||
// Define the character override table schema
|
||||
|
||||
Reference in New Issue
Block a user