"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.up = up; exports.down = down; // eslint-disable-next-line @typescript-eslint/no-explicit-any async function up(db) { await db.schema.createTable('findings') .ifNotExists() .addColumn('id', 'text', col => col.primaryKey()) .addColumn('session_id', 'text', col => col.notNull().references('sessions.id')) .addColumn('type', 'text', col => col.notNull()) .addColumn('severity', 'text', col => col.notNull()) .addColumn('description', 'text', col => col.notNull()) .addColumn('status', 'text', col => col.notNull().defaultTo('open')) .addColumn('action_trace_json', 'text', col => col.notNull()) .addColumn('evidence_json', 'text', col => col.notNull()) .addColumn('screenshot_path', 'text') .addColumn('dom_snapshot_path', 'text') .addColumn('browser', 'text') .addColumn('browser_version', 'text') .addColumn('ai_enrichment_json', 'text') .addColumn('created_at', 'integer', col => col.notNull()) .addColumn('resolved_at', 'integer') .execute(); } // eslint-disable-next-line @typescript-eslint/no-explicit-any async function down(db) { await db.schema.dropTable('findings').ifExists().execute(); }