Remove Serbian colors including Braon from database

- Remove Serbian color entries from schema.sql
- Add migration to delete Serbian colors from existing databases
- Add migration runner scripts for easier database updates
- Install pg package for PostgreSQL client support

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: DaX <noreply@anthropic.com>
This commit is contained in:
DaX
2025-06-24 12:04:45 +02:00
parent e8f9a6c6e3
commit 57abb80072
6 changed files with 245 additions and 13 deletions

View File

@@ -0,0 +1,37 @@
const { Pool } = require('pg');
// Parse connection string from environment or command line
const connectionString = process.env.DATABASE_URL || process.argv[2];
const migrationSQL = process.argv[3];
if (!connectionString || !migrationSQL) {
console.error('Usage: node run-specific-migration.js "postgresql://..." "SQL"');
process.exit(1);
}
const pool = new Pool({
connectionString,
ssl: {
rejectUnauthorized: false // For AWS RDS
}
});
async function runMigration() {
try {
console.log('Running migration SQL:', migrationSQL);
// Execute the migration
const result = await pool.query(migrationSQL);
console.log('✅ Migration completed successfully!');
console.log('Rows affected:', result.rowCount);
} catch (error) {
console.error('❌ Migration failed:', error.message);
process.exit(1);
} finally {
await pool.end();
}
}
runMigration();