Fix event table.

This commit is contained in:
Mike Cao committed 2022-08-05 13:07:20 -07:00
1 parent 62b032ab19
commit 7ae457669b
4 files changed
+47 -68

No files matched your search

+5
View File
@@ -10,6 +10,10 @@ function success(msg) {
console.log(chalk.greenBright(`✓ ${msg}`));
}
function error(msg) {
console.log(chalk.redBright(`✗ ${msg}`));
}
async function checkEnv() {
if (!process.env.DATABASE_URL) {
throw new Error('DATABASE_URL is not defined.');
@@ -34,6 +38,7 @@ async function checkTables() {
success('Database tables found.');
} catch (e) {
error('Database tables not found.');
console.log('Adding tables...');
console.log(execSync('prisma migrate deploy').toString());