Refactor migrations.

This commit is contained in:
Mike Cao 2022-06-19 00:07:01 -07:00
parent 5899a8d45c
commit 3122bab419
15 changed files with 46 additions and 65 deletions

16
scripts/check-db.js Normal file
View file

@ -0,0 +1,16 @@
require('dotenv').config();
const { PrismaClient } = require('@prisma/client');
const prisma = new PrismaClient();
async function check() {
await prisma.account.findMany({ limit: 1 });
}
check()
.catch(e => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});