fase(5): findings module complete
Some checks failed
ABE Exploratory Testing / explore (push) Has been cancelled
Some checks failed
ABE Exploratory Testing / explore (push) Has been cancelled
This commit is contained in:
29
dist/db/migrations/002_findings_table.js
vendored
Normal file
29
dist/db/migrations/002_findings_table.js
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
"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();
|
||||
}
|
||||
Reference in New Issue
Block a user