stash/pkg/sqlite/migrations/44_gallery_chapters.up.sql
yoshnopa 7e8f941155
Add Chapters for Galleries (#3289)
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2023-03-16 15:04:54 +11:00

10 lines
427 B
SQL

CREATE TABLE `galleries_chapters` (
`id` integer not null primary key autoincrement,
`title` varchar(255) not null,
`image_index` integer not null,
`gallery_id` integer not null,
`created_at` datetime not null,
`updated_at` datetime not null,
foreign key(`gallery_id`) references `galleries`(`id`) on delete CASCADE
);
CREATE INDEX `index_galleries_chapters_on_gallery_id` on `galleries_chapters` (`gallery_id`);