mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 04:14:39 +03:00
Movie/Group tags (#4969)
* Combine common tag control code into hook * Combine common scraped tag row code into hook
This commit is contained in:
10
pkg/sqlite/migrations/61_movie_tags.up.sql
Normal file
10
pkg/sqlite/migrations/61_movie_tags.up.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE `movies_tags` (
|
||||
`movie_id` integer NOT NULL,
|
||||
`tag_id` integer NOT NULL,
|
||||
foreign key(`movie_id`) references `movies`(`id`) on delete CASCADE,
|
||||
foreign key(`tag_id`) references `tags`(`id`) on delete CASCADE,
|
||||
PRIMARY KEY(`movie_id`, `tag_id`)
|
||||
);
|
||||
|
||||
CREATE INDEX `index_movies_tags_on_tag_id` on `movies_tags` (`tag_id`);
|
||||
CREATE INDEX `index_movies_tags_on_movie_id` on `movies_tags` (`movie_id`);
|
||||
Reference in New Issue
Block a user