Added email columns to users and notifications table.

This commit is contained in:
DebaucheryLibrarian
2026-07-21 04:42:30 +02:00
parent be31679886
commit 108017884a
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
exports.up = async function(knex) {
await knex.schema.alterTable('users', (table) => {
table.jsonb('settings');
});
await knex.schema.alterTable('notifications', (table) => {
table.boolean('notify')
.notNullable()
.defaultTo(true);
table.boolean('email')
.notNullable()
.defaultTo(false);
table.datetime('emailed_at');
});
};
exports.down = async function(knex) {
await knex.schema.alterTable('users', (table) => {
table.dropColumn('settings');
});
await knex.schema.alterTable('notifications', (table) => {
table.dropColumn('notify');
table.dropColumn('email');
table.dropColumn('emailed_at');
});
};