From 2332c44929fb6297f0b29dda944cb7ac56771ffe Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 18 Jan 2021 00:07:23 +0100 Subject: [PATCH] :heart: db upgrade --- .circleci/config.yml | 11 +++++------ Procfile | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e470015..84b7a71 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -27,7 +27,7 @@ jobs: # A basic unit of work in a run # - run: sudo chown -R circleci:circleci /usr/local/lib/python3.8/site-packages - restore_cache: # Read about caching dependencies: https://circleci.com/docs/2.0/caching/ - key: deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + key: deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} - run: command: | python3 -m venv venv @@ -39,7 +39,7 @@ jobs: # A basic unit of work in a run FLASK_DEBUG: 1 DATABASE_URL: postgresql://circle_test:pwd@localhost:5432/circle_test - save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key - key: deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + key: deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} paths: - "venv" @@ -63,15 +63,14 @@ jobs: # A basic unit of work in a run - checkout - restore_cache: keys: - - deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} - - deps9-{{ .Branch }}- + - deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + - deps10-{{ .Branch }}- - run: command: | . venv/bin/activate sleep 1 flask db stamp head flask db migrate - flask db upgrade # flask db test environment: CONDUIT_SECRET: "something-really-secret" @@ -80,7 +79,7 @@ jobs: # A basic unit of work in a run DATABASE_URL: postgresql://circle_test:pwd@localhost:5432/circle_test - save_cache: # cache Python dependencies using checksum of Pipfile as the cache-key - key: deps9-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} + key: deps10-{{ .Branch }}-{{ checksum "requirements/dev.txt" }} paths: - "venv" heroku: diff --git a/Procfile b/Procfile index 74d92ae..a96c523 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: gunicorn autoapp:app -b 0.0.0.0:$PORT -w 3 \ No newline at end of file +web: flask db upgrade;gunicorn autoapp:app -b 0.0.0.0:$PORT -w 3