- Add backend stale process monitoring API (/api/stale-processes) - Add users management route - Add frontend landing page and stale process monitor UI on /scraper-tools - Move old development scripts to backend/archive/ - Update frontend build with new features 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
579 B
TypeScript
23 lines
579 B
TypeScript
import { pool } from './src/db/migrate.js';
|
|
|
|
async function main() {
|
|
console.log('Adding discount columns to products table...');
|
|
|
|
try {
|
|
await pool.query(`
|
|
ALTER TABLE products
|
|
ADD COLUMN IF NOT EXISTS discount_type VARCHAR(50),
|
|
ADD COLUMN IF NOT EXISTS discount_value VARCHAR(100);
|
|
`);
|
|
|
|
console.log('✅ Successfully added discount_type and discount_value columns');
|
|
} catch (error: any) {
|
|
console.error('❌ Error adding columns:', error.message);
|
|
throw error;
|
|
} finally {
|
|
await pool.end();
|
|
}
|
|
}
|
|
|
|
main().catch(console.error);
|