29 lines
717 B
JavaScript
29 lines
717 B
JavaScript
const { Pool } = require('pg');
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const pool = new Pool({
|
|
connectionString: 'postgresql://sail:password@localhost:5432/dutchie_menus'
|
|
});
|
|
|
|
async function runMigration() {
|
|
const client = await pool.connect();
|
|
|
|
try {
|
|
const migrationPath = '/home/kelly/dutchie-menus/backend/migrations/010_store_logo.sql';
|
|
const sql = fs.readFileSync(migrationPath, 'utf8');
|
|
|
|
console.log('Running migration: 010_store_logo.sql');
|
|
await client.query(sql);
|
|
console.log('✅ Migration completed successfully');
|
|
|
|
} catch (error) {
|
|
console.error('❌ Migration failed:', error);
|
|
} finally {
|
|
client.release();
|
|
pool.end();
|
|
}
|
|
}
|
|
|
|
runMigration();
|