From 87ee519f0d00c9db296eb92c821a17f15a1d2fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Gru=CC=88ndger?= Date: Tue, 24 Sep 2019 19:37:02 +0200 Subject: [PATCH] Remove alembic commands since they are already available with flask_migrate --- app/commands/database.py | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/app/commands/database.py b/app/commands/database.py index 96440b8..05fd4e5 100644 --- a/app/commands/database.py +++ b/app/commands/database.py @@ -52,8 +52,6 @@ def init(): db.session.commit() db.create_all() - # alembic_cfg = Config(ALEMBIC_CONFIG_FILE) - # command.stamp(alembic_cfg, "head") print("Done.") @@ -66,16 +64,7 @@ def init_timescaledb(): db.session.execute("SELECT create_hypertable('receiver_beacons', 'timestamp', chunk_target_size => '2GB', if_not_exists => TRUE);") db.session.commit() - -@user_cli.command("upgrade") -def upgrade(): - """Upgrade database to the latest version.""" - - from alembic.config import Config - from alembic import command - - alembic_cfg = Config(ALEMBIC_CONFIG_FILE) - command.upgrade(alembic_cfg, "head") + print("Done.") @user_cli.command("drop")