Files
cannaiq/backend/run-scrape-jobs-migration.ts
2025-11-28 19:45:44 -07:00

19 lines
556 B
TypeScript

import { pool } from './src/db/migrate.js';
import fs from 'fs';
async function runMigration() {
try {
const sql = fs.readFileSync('/home/kelly/dutchie-menus/backend/migrations/create-scrape-jobs.sql', 'utf8');
console.log('Running migration: create-scrape-jobs.sql');
await pool.query(sql);
console.log('✅ Migration complete - brand_scrape_jobs table created');
await pool.end();
} catch (error: any) {
console.error('❌ Migration failed:', error.message);
await pool.end();
process.exit(1);
}
}
runMigration();