Browse Source

* Added missing keep_alive for peer (Migration)

pull/67/head
Per-Arne Andersen 4 years ago
parent
commit
3de1ed62ca
  1. 21
      wg_dashboard_backend/migrations/versions/010_create_keep_alive_peer.py

21
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
Loading…
Cancel
Save