From ea368ce3b9494662af8513d29b9e01153d09d126 Mon Sep 17 00:00:00 2001 From: Seun Ogunbiyi <91503321+Tiny49@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:04:56 +0000 Subject: [PATCH] remove the run migration paas script from the repo (#267) --- scripts/run_migrations_paas.py | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100755 scripts/run_migrations_paas.py diff --git a/scripts/run_migrations_paas.py b/scripts/run_migrations_paas.py deleted file mode 100755 index 6d26b765..00000000 --- a/scripts/run_migrations_paas.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 -import json -import subprocess -import sys -from os import environ - -instance_index = json.loads(environ.get("VCAP_APPLICATION"))["instance_index"] -# Only run on first instance -if instance_index != 0: - sys.exit(0) - -environ["SQLALCHEMY_DATABASE_URI"] = environ.get("DATABASE_URL").replace("postgres://", "postgresql://") - -result = subprocess.run(["flask", "db", "upgrade"]) -sys.exit(result.returncode)