Merge pull request #83 from othrayte/pg-migration-error-user-is-reserved

Fix SQL syntax for user table insert statement
This commit is contained in:
Richard R 2026-04-04 12:30:32 -06:00 committed by GitHub
commit b600b67252
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]
);
}