mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Use generated prisma client.
This commit is contained in:
parent
c0ccffeab4
commit
63e0873b5d
9 changed files with 1253 additions and 114 deletions
|
|
@ -1,10 +1,10 @@
|
|||
/* eslint-disable no-console */
|
||||
import 'dotenv/config';
|
||||
|
||||
import { PrismaClient } from '../src/generated/prisma/index.js';
|
||||
import { execSync } from 'node:child_process';
|
||||
import chalk from 'chalk';
|
||||
import { execSync } from 'child_process';
|
||||
import semver from 'semver';
|
||||
import { PrismaClient } from '../dist/generated/prisma/client.js';
|
||||
|
||||
if (process.env.SKIP_DB_CHECK) {
|
||||
console.log('Skipping database check.');
|
||||
|
|
@ -92,7 +92,13 @@ async function applyMigration() {
|
|||
|
||||
(async () => {
|
||||
let err = false;
|
||||
for (let fn of [checkEnv, checkConnection, checkDatabaseVersion, checkV1Tables, applyMigration]) {
|
||||
for (const fn of [
|
||||
checkEnv,
|
||||
checkConnection,
|
||||
checkDatabaseVersion,
|
||||
checkV1Tables,
|
||||
applyMigration,
|
||||
]) {
|
||||
try {
|
||||
await fn();
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue