vk_files.cjs
518 Bytes
const tableName = 'vk_files'
function buildTable(t) {
t.string('id', 64).primary()
t.string('task_id', 64).notNullable()
t.string('agent_id', 64).notNullable()
t.string('filename', 255).notNullable()
t.integer('size_bytes').unsigned().notNullable()
t.string('sha256', 64).notNullable()
t.datetime('created_at', { precision: 3 }).notNullable()
t.index(['task_id', 'agent_id'], 'idx_vk_files_task_agent')
t.check('size_bytes > 0', [], 'ck_vk_files_size')
}
module.exports = { tableName, buildTable }