diff --git a/wg_dashboard_backend/migrations/versions/010_create_keep_alive_peer.py b/wg_dashboard_backend/migrations/versions/010_create_keep_alive_peer.py new file mode 100644 index 0000000..6431f5f --- /dev/null +++ b/wg_dashboard_backend/migrations/versions/010_create_keep_alive_peer.py @@ -0,0 +1,21 @@ +from sqlalchemy import * +from migrate import * + + +def upgrade(migrate_engine): + try: + meta = MetaData(bind=migrate_engine) + peer = Table('peer', meta, autoload=True) + keep_alive = Column('keep_alive', Integer) + keep_alive.create(peer) + except: + pass + + +def downgrade(migrate_engine): + try: + meta = MetaData(bind=migrate_engine) + peer = Table('peer', meta, autoload=True) + peer.c.keep_alive.drop() + except: + pass