mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fix v1 check error showing in postgres logs
This commit is contained in:
parent
acb7fdcae8
commit
0e0788b0a1
@ -66,12 +66,16 @@ async function checkDatabaseVersion() {
|
|||||||
|
|
||||||
async function checkV1Tables() {
|
async function checkV1Tables() {
|
||||||
try {
|
try {
|
||||||
await prisma.$queryRaw`select * from account limit 1`;
|
// check for v1 migrations before v2 release date
|
||||||
|
const record =
|
||||||
|
await prisma.$queryRaw`select * from _prisma_migrations where started_at < '2023-04-17'`;
|
||||||
|
|
||||||
error(
|
if (record.length > 0) {
|
||||||
'Umami v1 tables detected. For how to upgrade from v1 to v2 go to https://umami.is/docs/migrate-v1-v2.',
|
error(
|
||||||
);
|
'Umami v1 tables detected. For how to upgrade from v1 to v2 go to https://umami.is/docs/migrate-v1-v2.',
|
||||||
process.exit(1);
|
);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user