Remove alembic commands since they are already available with flask_migrate

pull/78/head
Konstantin Gründger 2019-09-24 19:37:02 +02:00
rodzic 426247045d
commit 87ee519f0d
1 zmienionych plików z 1 dodań i 12 usunięć

Wyświetl plik

@ -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")