gfsd
This commit is contained in:
@@ -545,6 +545,17 @@ process.on('uncaughtException', err => {
|
||||
await runMigration(db`CREATE INDEX IF NOT EXISTS idx_album_items_item_id ON album_items(item_id, order_index ASC)`);
|
||||
await runMigration(db`ALTER TABLE album_items ADD COLUMN IF NOT EXISTS slug character varying(60) DEFAULT NULL`);
|
||||
await runMigration(db`CREATE INDEX IF NOT EXISTS idx_album_items_slug ON album_items(slug)`);
|
||||
await runMigration(db`
|
||||
CREATE TABLE IF NOT EXISTS album_items_tags_assign (
|
||||
album_item_id INTEGER NOT NULL REFERENCES album_items(id) ON DELETE CASCADE,
|
||||
tag_id INTEGER NOT NULL REFERENCES tags(id) ON DELETE CASCADE,
|
||||
user_id INTEGER REFERENCES "user"(id) ON DELETE SET DEFAULT,
|
||||
created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
|
||||
PRIMARY KEY (album_item_id, tag_id)
|
||||
)
|
||||
`);
|
||||
await runMigration(db`CREATE INDEX IF NOT EXISTS idx_album_items_tags_assign_tag_id ON album_items_tags_assign(tag_id)`);
|
||||
await runMigration(db`CREATE INDEX IF NOT EXISTS idx_album_items_tags_assign_album_item_id ON album_items_tags_assign(album_item_id)`);
|
||||
|
||||
// Initial halls cache (only if halls are enabled)
|
||||
if (cfg.websrv.halls_enabled !== false) {
|
||||
|
||||
Reference in New Issue
Block a user