Skip to content

Commit

Permalink
Merge pull request #7 from KariukiAntony/backend
Browse files Browse the repository at this point in the history
apply migration after success tests
  • Loading branch information
KariukiAntony authored Mar 25, 2024
2 parents f184056 + f24b97d commit a23ece3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/docker-build-backend--and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
- name: run the tests
run: |
flask tests
flask migrate
shell: bash

build_and_pub:
Expand Down
2 changes: 2 additions & 0 deletions backend/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ def make_shell_context():
@app.before_request
def create_db():
with app.app_context():
db.drop_all()
print("dropped all the tables ")
db.create_all()
logger.info(
colored("Database tables created successfully", "green", attrs=["bold"])
Expand Down

0 comments on commit a23ece3

Please sign in to comment.