update check-db

This commit is contained in:
Brian Cao 2022-10-03 11:14:19 -07:00
parent 6de634f0b4
commit a2ce1d833d

View File

@ -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) {