Browse Source

* Attempt to fix #66

pull/78/head
Per-Arne Andersen 4 years ago
parent
commit
cc43a9caa3
  1. 20
      wg_dashboard_backend/migrations/versions/011_alter_server_ipv6_subnet_nullable.py

20
wg_dashboard_backend/migrations/versions/011_alter_server_ipv6_subnet_nullable.py

@ -0,0 +1,20 @@
from sqlalchemy import *
from migrate import *
def upgrade(migrate_engine):
try:
meta = MetaData(bind=migrate_engine)
server = Table('server', meta, autoload=True)
server.c.v6_subnet.alter(nullable=True)
except:
pass
def downgrade(migrate_engine):
try:
meta = MetaData(bind=migrate_engine)
server = Table('server', meta, autoload=True)
server.c.v6_subnet.alter(nullable=False)
except:
pass
Loading…
Cancel
Save