mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 04:44:37 +03:00
Feature: Support Multiple URLs in Studios (#6223)
* 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>
This commit is contained in:
24
pkg/sqlite/migrations/73_studio_urls.up.sql
Normal file
24
pkg/sqlite/migrations/73_studio_urls.up.sql
Normal file
@@ -0,0 +1,24 @@
|
||||
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`;
|
||||
Reference in New Issue
Block a user