Updated prisma and added disconnect.

This commit is contained in:
Mike Cao 2020-09-29 21:39:51 -07:00
parent ce2ca57aba
commit e64b35f701
3 changed files with 23 additions and 19 deletions

View File

@ -16,9 +16,13 @@ export function getDatabase() {
}
export async function runQuery(query) {
return query.catch(e => {
throw e;
});
return query
.catch(e => {
throw e;
})
.finally(async () => {
await prisma.$disconnect();
});
}
export async function rawQuery(query, params) {

View File

@ -1,6 +1,6 @@
{
"name": "umami",
"version": "0.61.0",
"version": "0.62.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>",
"license": "MIT",
@ -50,7 +50,7 @@
}
},
"dependencies": {
"@prisma/client": "2.7.1",
"@prisma/client": "2.8.0",
"@reduxjs/toolkit": "^1.4.0",
"bcrypt": "^5.0.0",
"chalk": "^4.1.0",
@ -61,7 +61,7 @@
"date-fns": "^2.16.1",
"date-fns-tz": "^1.0.10",
"detect-browser": "^5.1.1",
"formik": "^2.1.5",
"formik": "^2.1.6",
"immer": "^7.0.9",
"is-localhost-ip": "^1.4.0",
"isbot-fast": "^1.2.0",
@ -88,7 +88,7 @@
},
"devDependencies": {
"@formatjs/cli": "^2.12.0",
"@prisma/cli": "2.7.1",
"@prisma/cli": "2.8.0",
"@rollup/plugin-buble": "^0.21.3",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",

View File

@ -1193,15 +1193,15 @@
resolved "https://registry.yarnpkg.com/@panva/asn1.js/-/asn1.js-1.0.0.tgz#dd55ae7b8129e02049f009408b97c61ccf9032f6"
integrity sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==
"@prisma/cli@2.7.1":
version "2.7.1"
resolved "https://registry.yarnpkg.com/@prisma/cli/-/cli-2.7.1.tgz#98f2cb434bb931341e6c6292c7bab601e5f842f8"
integrity sha512-0uA+gWkNQ35DveVHDPltiTCTr4wcXtEhnPs463IEM+Xn8dTv9x0gtZiYHSuQM3t7uwlOxj1rurBsqSbiljynfQ==
"@prisma/cli@2.8.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@prisma/cli/-/cli-2.8.0.tgz#919d7f66023affa76d14823212b62a8512cfd37d"
integrity sha512-Kg1C47d75jdEIMmJif8TMlv/2Ihx08E1qWp0euwoZhjd807HGnjgC9tJYjTfkdf+NMJSAUbvoPXKInEX0HoOMw==
"@prisma/client@2.7.1":
version "2.7.1"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-2.7.1.tgz#0a37ddff7fe80ae3a86dfa620c1141c8607be6c2"
integrity sha512-IEWDCuvIaQTira8/jAyf+uY+AuPPUFDIXMSN4zEA/gvoJv2woq7RmkaubS+NQVgDbbyOR6F3UcXLiFTYQDzZkQ==
"@prisma/client@2.8.0":
version "2.8.0"
resolved "https://registry.yarnpkg.com/@prisma/client/-/client-2.8.0.tgz#a0f7247786c9b6ee804437acf8215854c5eb3946"
integrity sha512-5+GzRTkPnmv4OEV2tB8kwQt/xLLxBR/daJBcMt6pnnonJvrREsu0tSTdz2LJNPaj3kTT0fSS/OaeGMMdfVYSpw==
dependencies:
pkg-up "^3.1.0"
@ -4145,10 +4145,10 @@ for-own@^0.1.3:
dependencies:
for-in "^1.0.1"
formik@^2.1.5:
version "2.1.5"
resolved "https://registry.yarnpkg.com/formik/-/formik-2.1.5.tgz#de5bbbe35543fa6d049fe96b8ee329d6cd6892b8"
integrity sha512-bWpo3PiqVDYslvrRjTq0Isrm0mFXHiO33D8MS6t6dWcqSFGeYF52nlpCM2xwOJ6tRVRznDkL+zz/iHPL4LDuvQ==
formik@^2.1.6:
version "2.1.6"
resolved "https://registry.yarnpkg.com/formik/-/formik-2.1.6.tgz#f723bfccb2c7abec886aa6a4930b360d20f1a0b3"
integrity sha512-m9DcxlZw/58p4xuhH3dzUzQWaC4dig0RKX7yNQOJt4VRhXn7p+YRrs3o17r3YwzvOLua3zC53VMbfupLsDwO5w==
dependencies:
deepmerge "^2.1.1"
hoist-non-react-statics "^3.3.0"