From 5e86d7ab9c5200d794c3adb2b422d20a2aefd2ce Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 13 Aug 2022 02:00:50 +0200 Subject: restructure to single project --- bundle/scripts/db_migrations.sh | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100755 bundle/scripts/db_migrations.sh (limited to 'bundle/scripts/db_migrations.sh') diff --git a/bundle/scripts/db_migrations.sh b/bundle/scripts/db_migrations.sh deleted file mode 100755 index 83f15a2b..00000000 --- a/bundle/scripts/db_migrations.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -if [ ! -z "$1" ] -then - FILENAME="$1" - echo "Using filename: $FILENAME" -else - read -p "Enter migration filename: " FILENAME -fi - -[ -f ".env" ] && ( - mv .env .env.tmp - source .env.tmp -) - -make_migration() { - echo "Creating migrations for $2" - mkdir "../util/src/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 - npm run build clean logerrors pretty-errors - THREADS=1 DATABASE="$1" DB_MIGRATE=a npm run start:bundle -} - -npm i sqlite3 -make_migration "database.db" "sqlite" - -[ -z "$FC_DB_POSTGRES" ] || ( - npm i pg - make_migration "$FC_DB_POSTGRES" "postgres" -) - -[ -z "$FC_DB_MARIADB" ] || ( - npm i mysql2 - make_migration "$FC_DB_MARIADB" "mariadb" -) - -[ -f ".env.tmp" ] && mv .env.tmp .env - -- cgit 1.5.1