12 lines
599 B
SQL
12 lines
599 B
SQL
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
|
CREATE TABLE `__new_character_spell` (
|
|
`character` integer NOT NULL,
|
|
`value` text NOT NULL,
|
|
PRIMARY KEY(`character`, `value`),
|
|
FOREIGN KEY (`character`) REFERENCES `character`(`id`) ON UPDATE cascade ON DELETE cascade
|
|
);
|
|
--> statement-breakpoint
|
|
INSERT INTO `__new_character_spell`("character", "value") SELECT "character", "value" FROM `character_spell`;--> statement-breakpoint
|
|
DROP TABLE `character_spell`;--> statement-breakpoint
|
|
ALTER TABLE `__new_character_spell` RENAME TO `character_spell`;--> statement-breakpoint
|
|
PRAGMA foreign_keys=ON; |