/
opt
/
imunify360
/
venv
/
lib64
/
python3.11
/
site-packages
/
defence360agent
/
migrations
/
Upload File
HOME
import peewee as pw def migrate(migrator, database, fake=False, **kwargs): orm_IPList = migrator.orm["iplist"] IP_LISTS = ("WHITE", "BLACK", "GRAY", "GRAY_SPLASHSCREEN") migrator.change_fields( orm_IPList, listname=pw.CharField( null=False, constraints=[ pw.Check("listname in ('{}')".format("','".join(IP_LISTS))) ], ), ) def rollback(migrator, database, fake=False, **kwargs): pass