Added effective date column. Changed warning page theme.

This commit is contained in:
DebaucheryLibrarian
2021-06-19 18:09:58 +02:00
parent 10a2731caf
commit d1480da076
40 changed files with 77 additions and 33 deletions

View File

@@ -1274,11 +1274,16 @@ exports.up = knex => Promise.resolve()
.notNullable()
.defaultTo(knex.fn.now());
}))
// SEARCH
// SEARCH AND SORT
.then(() => { // eslint-disable-line arrow-body-style
// allow vim fold
return knex.raw(`
ALTER TABLE releases_search ADD COLUMN document tsvector;
/* allow scenes without dates to be mixed inbetween scenes with dates */
ALTER TABLE releases
ADD COLUMN effective_date timestamptz
GENERATED ALWAYS AS (COALESCE(date, created_at)) STORED;
`);
})
// INDEXES