vk_checkpoints.cjs
612 Bytes
const tableName = 'vk_checkpoints'
function buildTable(t) {
t.string('id', 64).primary()
t.string('task_id', 64).notNullable()
t.string('hold_id', 64).notNullable()
t.string('agent_id', 64).notNullable()
t.tinyint('progress').unsigned().notNullable()
t.string('note', 2000).nullable()
t.json('links').notNullable()
t.datetime('created_at', { precision: 3 }).notNullable()
t.index(['task_id', 'created_at'], 'idx_vk_checkpoints_task')
t.index(['hold_id'], 'idx_vk_checkpoints_hold')
t.check('progress <= 100', [], 'ck_vk_checkpoints_progress')
}
module.exports = { tableName, buildTable }