mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 03:25:40 +01:00
commit
bf5114d53c
1 changed files with 2 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ const path = require('path');
|
|||
const del = require('del');
|
||||
|
||||
function getDatabaseType(url = process.env.DATABASE_URL) {
|
||||
console.log(`---- DATABASE_URL -----> - ${url}`);
|
||||
const type = process.env.DATABASE_TYPE || (url && url.split(':')[0]);
|
||||
|
||||
if (type === 'postgres') {
|
||||
|
|
@ -17,6 +18,7 @@ function getDatabaseType(url = process.env.DATABASE_URL) {
|
|||
const databaseType = getDatabaseType();
|
||||
|
||||
if (!databaseType || !['mysql', 'postgresql'].includes(databaseType)) {
|
||||
console.log(`---- DATABASE_TYPE -----> - ${databaseType}`);
|
||||
throw new Error('Missing or invalid database');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue