From 3ef6f1514fcf2744c503b1097c8996eefc66a848 Mon Sep 17 00:00:00 2001 From: Jurgis Sakalauskas Date: Fri, 3 Nov 2023 11:15:45 +0200 Subject: [PATCH] change migration --- Dockerfile | 1 - .../1673603746273-CreateTorrentsTableAndRelateToFiles.ts | 1 + start.sh | 4 ++++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2657bd9..ae41c77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,6 @@ RUN apt-get install ffmpeg -y WORKDIR /srv/app COPY ./ /srv/app RUN npm install -RUN npm run typeorm:run-migrations EXPOSE $PORT diff --git a/migrations/1673603746273-CreateTorrentsTableAndRelateToFiles.ts b/migrations/1673603746273-CreateTorrentsTableAndRelateToFiles.ts index 83bdca2..d36ce27 100644 --- a/migrations/1673603746273-CreateTorrentsTableAndRelateToFiles.ts +++ b/migrations/1673603746273-CreateTorrentsTableAndRelateToFiles.ts @@ -25,6 +25,7 @@ export class CreateTorrentsTableAndRelateToFiles1673603746273 info_hash VARCHAR(64), progress REAL, transmission_id INTEGER, + linkomanija TINYINT, info TEXT );`, ); diff --git a/start.sh b/start.sh index 5c6d093..1a9617b 100644 --- a/start.sh +++ b/start.sh @@ -6,12 +6,16 @@ if [ "$NODE_ENV" == "production" ]; then npm run prebuild echo "Running build" npm run build + echo "Running migrations" + npm run typeorm:run-migrations echo "Starting app" npm run start:prod else echo "Starting app in development mode" echo "Running prebuild" npm run prebuild + echo "Running migrations" + npm run typeorm:run-migrations echo "Starting app" npm run start:dev fi