vk_reviews.cjs
699 Bytes
const tableName = 'vk_reviews'
function buildTable(t) {
t.string('id', 64).primary()
t.string('task_id', 64).notNullable()
t.string('submission_id', 64).notNullable()
t.string('reviewer_kind', 16).notNullable()
t.string('action', 16).notNullable()
t.text('reason').nullable()
t.datetime('created_at', { precision: 3 }).notNullable()
t.index(['task_id', 'created_at'], 'idx_vk_reviews_task')
t.index(['submission_id'], 'idx_vk_reviews_submission')
t.check("reviewer_kind in ('publisher','auto','arbitration')", [], 'ck_vk_reviews_reviewer_kind')
t.check("action in ('accept','reject','select_winner')", [], 'ck_vk_reviews_action')
}
module.exports = { tableName, buildTable }