hindki/hindki/drizzle/0001_shallow_sasquatch.sql
ryan 3b3b1196b6
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 4s
Migrate to sqlite
2025-10-02 11:42:40 -07:00

13 lines
615 B
SQL

PRAGMA foreign_keys=OFF;--> statement-breakpoint
CREATE TABLE `__new_see_also` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`word_id` integer NOT NULL,
`reference` text NOT NULL,
`note` text,
FOREIGN KEY (`word_id`) REFERENCES `words`(`id`) ON UPDATE no action ON DELETE cascade
);
--> statement-breakpoint
INSERT INTO `__new_see_also`("id", "word_id", "reference", "note") SELECT "id", "word_id", "reference", "note" FROM `see_also`;--> statement-breakpoint
DROP TABLE `see_also`;--> statement-breakpoint
ALTER TABLE `__new_see_also` RENAME TO `see_also`;--> statement-breakpoint
PRAGMA foreign_keys=ON;