Add checkup review flags, duplicate detection, and corrected painting images.

Introduce checkup_checked/checkup_fixed on paintings with Checkup page filters and API. Fixed paintings auto-mark as reviewed. Add find-duplicates tooling and document debug/checkup workflow. Include Botticelli and Michelangelo image fixes from checkup.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-06-20 20:45:55 +03:00
co-authored by Cursor
parent 4683089495
commit 4c6acd5a3a
55 changed files with 750 additions and 39 deletions
+26
View File
@@ -0,0 +1,26 @@
require('dotenv').config();
const fs = require('fs');
const path = require('path');
const pool = require('../server/db');
async function main() {
const sqlPath = path.join(__dirname, '../db/migrate-checkup-flags.sql');
const sql = fs.readFileSync(sqlPath, 'utf8');
await pool.query(sql);
await pool.query(
`UPDATE paintings SET checkup_checked = true WHERE checkup_fixed = true AND NOT checkup_checked`
);
const { rows } = await pool.query(`
SELECT
COUNT(*) FILTER (WHERE checkup_checked)::int AS checked,
COUNT(*) FILTER (WHERE checkup_fixed)::int AS fixed
FROM paintings
`);
console.log(`checkup flags ready (${rows[0].checked} checked, ${rows[0].fixed} fixed)`);
await pool.end();
}
main().catch((err) => {
console.error(err);
process.exit(1);
});