mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-24 18:26:20 +01:00
update check-db
This commit is contained in:
parent
6de634f0b4
commit
a2ce1d833d
@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable no-console */
|
||||||
require('dotenv').config();
|
require('dotenv').config();
|
||||||
const { PrismaClient } = require('@prisma/client');
|
const { PrismaClient } = require('@prisma/client');
|
||||||
const chalk = require('chalk');
|
const chalk = require('chalk');
|
||||||
@ -39,7 +40,7 @@ async function checkConnection() {
|
|||||||
|
|
||||||
async function checkTables() {
|
async function checkTables() {
|
||||||
try {
|
try {
|
||||||
await prisma.account.findFirst();
|
await prisma.$queryRaw`select * from account limit 1`;
|
||||||
|
|
||||||
success('Database tables found.');
|
success('Database tables found.');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user