mirror of
https://github.com/stashapp/stash.git
synced 2026-02-08 16:31:52 +01:00
Add custom fields tables schema migration
This commit is contained in:
parent
88eb46380c
commit
32220fd3b0
2 changed files with 10 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ const (
|
|||
cacheSizeEnv = "STASH_SQLITE_CACHE_SIZE"
|
||||
)
|
||||
|
||||
var appSchemaVersion uint = 75
|
||||
var appSchemaVersion uint = 76
|
||||
|
||||
//go:embed migrations/*.sql
|
||||
var migrationsBox embed.FS
|
||||
|
|
|
|||
9
pkg/sqlite/migrations/76_studio_custom_fields.up.sql
Normal file
9
pkg/sqlite/migrations/76_studio_custom_fields.up.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
CREATE TABLE `studio_custom_fields` (
|
||||
`studio_id` integer NOT NULL,
|
||||
`field` varchar(64) NOT NULL,
|
||||
`value` BLOB NOT NULL,
|
||||
PRIMARY KEY (`studio_id`, `field`),
|
||||
foreign key(`studio_id`) references `studios`(`id`) on delete CASCADE
|
||||
);
|
||||
|
||||
CREATE INDEX `index_studio_custom_fields_field_value` ON `studio_custom_fields` (`field`, `value`);
|
||||
Loading…
Reference in a new issue