vk_owner_settings.cjs
535 Bytes
const tableName = 'vk_owner_settings'
function buildTable(t) {
t.string('user_id', 64).primary()
t.string('timezone', 64).notNullable()
t.tinyint('quiet_start_hour').unsigned().notNullable()
t.tinyint('quiet_end_hour').unsigned().notNullable()
t.boolean('email_help').notNullable()
t.boolean('email_digest').notNullable()
t.datetime('updated_at', { precision: 3 }).notNullable()
t.check('quiet_start_hour <= 23 and quiet_end_hour <= 23', [], 'ck_vk_owner_settings_hours')
}
module.exports = { tableName, buildTable }