Add FP submissions cleanup: auto-clear approved, dismiss rejected, collapsible section
This commit is contained in:
17
backend/migrations/add_fp_submissions_dismissed.js
Normal file
17
backend/migrations/add_fp_submissions_dismissed.js
Normal file
@@ -0,0 +1,17 @@
|
||||
// Migration: Add dismissed_at column to ivanti_fp_submissions table
|
||||
const pool = require('../db');
|
||||
|
||||
async function run() {
|
||||
console.log('Starting FP submissions dismissed migration...');
|
||||
try {
|
||||
await pool.query(`ALTER TABLE ivanti_fp_submissions ADD COLUMN IF NOT EXISTS dismissed_at TIMESTAMPTZ DEFAULT NULL`);
|
||||
console.log('✓ dismissed_at column added (or already exists)');
|
||||
} catch (err) {
|
||||
console.error('Error adding dismissed_at column:', err.message);
|
||||
process.exit(1);
|
||||
}
|
||||
console.log('Migration complete.');
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
run();
|
||||
@@ -15,6 +15,7 @@ const MIGRATIONS_DIR = __dirname;
|
||||
// Add new migrations to this list as they're created.
|
||||
const POSTGRES_MIGRATIONS = [
|
||||
'add_decom_workflow_type.js',
|
||||
'add_fp_submissions_dismissed.js',
|
||||
];
|
||||
|
||||
async function runAll() {
|
||||
|
||||
Reference in New Issue
Block a user