1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-26 12:12:31 +01:00

Update db migration script

This commit is contained in:
TheArcaneBrony 2022-08-15 06:14:02 +02:00
parent 6d3706c2c8
commit 79d97a9252
No known key found for this signature in database
GPG Key ID: 32FC5AAADAD75A22

View File

@ -15,10 +15,10 @@ fi
make_migration() {
echo "Creating migrations for $2"
mkdir "../util/src/migrations/$2"
mkdir "src/util/migrations/$2"
# npm run build clean logerrors pretty-errors
# THREADS=1 DATABASE="$1" DB_MIGRATE=a npm run start:bundle
THREADS=1 DATABASE="$1" DB_MIGRATE=a npx typeorm-ts-node-commonjs migration:generate "../util/src/migrations/$2/$FILENAME" -d ../util/src/util/Database.ts -p
THREADS=1 DATABASE="$1" DB_MIGRATE=a npx typeorm-ts-node-commonjs migration:generate "src/migrations/$2/$FILENAME" -d ../util/src/util/Database.ts -p
npm run build clean logerrors pretty-errors
THREADS=1 DATABASE="$1" DB_MIGRATE=a npm run start:bundle
}