Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4aa118f

Browse files
committedMay 4, 2023
First attempt at migrating scheme to SQLDelight
1 parent 1e27be1 commit 4aa118f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+617
-1
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CREATE TABLE IF NOT EXISTS `recommended_entries` (
2+
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
3+
`show_id` INTEGER NOT NULL,
4+
`page` INTEGER NOT NULL,
5+
FOREIGN KEY(`show_id`) REFERENCES `shows`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
6+
);
7+
8+
-- indices
9+
10+
CREATE UNIQUE INDEX IF NOT EXISTS `index_recommended_entries_show_id` ON `recommended_entries` (`show_id`);
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
CREATE TABLE IF NOT EXISTS `related_shows` (
2+
`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
3+
`show_id` INTEGER NOT NULL,
4+
`other_show_id` INTEGER NOT NULL,
5+
`order_index` INTEGER NOT NULL,
6+
FOREIGN KEY(`show_id`) REFERENCES `shows`(`id`) ON UPDATE CASCADE ON DELETE CASCADE ,
7+
FOREIGN KEY(`other_show_id`) REFERENCES `shows`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
8+
);
9+
10+
-- indices
11+
12+
CREATE INDEX IF NOT EXISTS `index_related_shows_show_id` ON `related_shows` (`show_id`);
13+
14+
CREATE INDEX IF NOT EXISTS `index_related_shows_other_show_id` ON `related_shows` (`other_show_id`);
15+
There was a problem loading the remainder of the diff.

0 commit comments

Comments
 (0)
Failed to load comments.