Fix SQL syntax for user table insert statement

user is a reserved keyword in postgres
This commit is contained in:
Adrian Cowan 2026-04-04 18:31:09 +11:00 committed by GitHub
parent e8b5452863
commit d2f1fe65dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -734,7 +734,7 @@ async function migrateDatabaseRows(database, userId, docCandidates, audiobookBoo
);
} else {
await database.query(
"INSERT INTO user (id, name, email, email_verified, created_at, updated_at, is_anonymous) VALUES ($1, $2, $3, $4, to_timestamp($5 / 1000.0), to_timestamp($6 / 1000.0), $7) ON CONFLICT (id) DO NOTHING",
"INSERT INTO \"user\" (id, name, email, email_verified, created_at, updated_at, is_anonymous) VALUES ($1, $2, $3, $4, to_timestamp($5 / 1000.0), to_timestamp($6 / 1000.0), $7) ON CONFLICT (id) DO NOTHING",
[userId, 'System User', `${userId}@local`, false, now, now, false]
);
}