Integrate Inputs/PainterPalette.csv for artist metadata and influence links, add db/schema.sql with server/migrate.js, letterbox influence panel thumbnails, and refresh Titian/Pontormo images. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
623 B
JavaScript
21 lines
623 B
JavaScript
require('dotenv').config();
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
const pool = require('../server/db');
|
|
|
|
async function main() {
|
|
const sql = fs.readFileSync(path.join(__dirname, '../db/migrate-artist-palette.sql'), 'utf8');
|
|
await pool.query(sql);
|
|
const { rows } = await pool.query(`
|
|
SELECT column_name FROM information_schema.columns
|
|
WHERE table_name = 'artists' AND column_name = 'palette_metadata'
|
|
`);
|
|
console.log(rows.length ? 'artists.palette_metadata ready' : 'migration may have failed');
|
|
await pool.end();
|
|
}
|
|
|
|
main().catch((err) => {
|
|
console.error(err);
|
|
process.exit(1);
|
|
});
|