mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 04:44:28 +01:00
* Backend support for studio URLs * FrontEnd addition * Support URLs in BulkStudioUpdate * Update tagger modal for URLs --------- Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
24 lines
542 B
SQL
24 lines
542 B
SQL
CREATE TABLE `studio_urls` (
|
|
`studio_id` integer NOT NULL,
|
|
`position` integer NOT NULL,
|
|
`url` varchar(255) NOT NULL,
|
|
foreign key(`studio_id`) references `studios`(`id`) on delete CASCADE,
|
|
PRIMARY KEY(`studio_id`, `position`, `url`)
|
|
);
|
|
|
|
CREATE INDEX `studio_urls_url` on `studio_urls` (`url`);
|
|
|
|
INSERT INTO `studio_urls`
|
|
(
|
|
`studio_id`,
|
|
`position`,
|
|
`url`
|
|
)
|
|
SELECT
|
|
`id`,
|
|
'0',
|
|
`url`
|
|
FROM `studios`
|
|
WHERE `studios`.`url` IS NOT NULL AND `studios`.`url` != '';
|
|
|
|
ALTER TABLE `studios` DROP COLUMN `url`;
|