Updated updated path for the new table layout, moved models to a new module

This commit is contained in:
florian committed 2026-11-04 11:17:16 +01:00
1 parent 5296be3a80
commit 79e8de124a
3 files changed
+88 -48

No files matched your search

+15 -1
View File
@@ -9,4 +9,18 @@ CREATE TABLE `seadex_state` (
PRIMARY KEY (`id`),
UNIQUE KEY `uq_user_anilist` (`user_id`,`anilist_id`),
CONSTRAINT `fk_seadex_state_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE
)
)
CREATE TABLE `seadex_state_subscriptions` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`seadex_state_id` int(10) unsigned NOT NULL,
`anime_name` varchar(255) NOT NULL,
`active` tinyint(1) NOT NULL DEFAULT '1',
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `uq_user_state` (`user_id`,`seadex_state_id`),
KEY `idx_subscriptions_state` (`seadex_state_id`),
CONSTRAINT `fk_subscriptions_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`user_id`) ON DELETE CASCADE,
CONSTRAINT `fk_subscriptions_state` FOREIGN KEY (`seadex_state_id`) REFERENCES `seadex_state` (`id`) ON DELETE CASCADE
);