chore: align infrastructure with server

This commit is contained in:
2026-05-02 17:20:14 +05:00
parent e8c924f63a
commit 73c323685f
36 changed files with 785 additions and 540 deletions
+18
View File
@@ -0,0 +1,18 @@
const { Pool } = require('pg');
async function run() {
const pool = new Pool({ connectionString: 'postgresql://postgres:postgres@localhost:5432/xflow' });
const res = await pool.query('SELECT id, username FROM "User"');
console.log(JSON.stringify(res.rows, null, 2));
// Also change owner of all canvases to the first non-system user
const realUser = res.rows.find(u => u.username !== 'system');
if (realUser) {
await pool.query('UPDATE "Canvas" SET "ownerId" = $1', [realUser.id]);
console.log('Ownership of all canvases transferred to:', realUser.username);
}
await pool.end();
}
run().catch(console.error);