mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Don't run migrations on start (must be run explicitly)
This commit is contained in:
parent
0f1ee84c46
commit
1aa549e391
4 changed files with 3 additions and 4 deletions
|
@ -10,7 +10,8 @@
|
||||||
"format": "prettier --write \"./**/*.ts\"",
|
"format": "prettier --write \"./**/*.ts\"",
|
||||||
"typeorm": "ts-node ./node_modules/typeorm/cli.js",
|
"typeorm": "ts-node ./node_modules/typeorm/cli.js",
|
||||||
"build": "rimraf dist && tsc",
|
"build": "rimraf dist && tsc",
|
||||||
"start-prod": "cross-env NODE_ENV=production node dist/index.js"
|
"start-prod": "cross-env NODE_ENV=production node dist/index.js",
|
||||||
|
"migrate": "npm run typeorm -- migration:run"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": "",
|
"author": "",
|
||||||
|
|
|
@ -73,10 +73,8 @@ import { errorMessage, successMessage } from "./utils";
|
||||||
import { startUptimeCounter } from "./uptime";
|
import { startUptimeCounter } from "./uptime";
|
||||||
|
|
||||||
// Run latest database migrations
|
// Run latest database migrations
|
||||||
logger.info("Running database migrations");
|
logger.info("Connecting to database");
|
||||||
connect().then(async conn => {
|
connect().then(async conn => {
|
||||||
await conn.runMigrations();
|
|
||||||
|
|
||||||
const client = new Client(`Bot ${process.env.TOKEN}`, {
|
const client = new Client(`Bot ${process.env.TOKEN}`, {
|
||||||
getAllUsers: true,
|
getAllUsers: true,
|
||||||
restMode: true,
|
restMode: true,
|
||||||
|
|
Loading…
Add table
Reference in a new issue