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
+19
View File
@@ -0,0 +1,19 @@
const { Pool } = require('pg');
async function createUser() {
const pool = new Pool({ connectionString: 'postgresql://postgres:postgres@localhost:5432/xflow' });
try {
await pool.query(`
INSERT INTO "User" (id, username, email, password, role, "updatedAt")
VALUES ('almalexyz', 'almalexyz', 'almalexyz@gmail.com', 'none', 'admin', NOW())
ON CONFLICT DO NOTHING
`);
await pool.query(`
INSERT INTO "Profile" (id, "userId", "displayName", "updatedAt")
VALUES ('almalexyz-profile', 'almalexyz', 'Alexander', NOW())
ON CONFLICT DO NOTHING
`);
console.log('User created!');
} catch(e) { console.error(e) }
process.exit(0);
}
createUser();