📁 File Manager Pro
v10.0.2 | PHP: 8.1.34
Server: LiteSpeed
2026-06-29 05:29:39
📂
/
/
opt
/
imunify360
/
venv
/
lib
/
python3.11
/
site-packages
/
defence360agent
/
migrations
✏️
Editing: 098_remote_proxy_tables.py
import peewee as pw def migrate(migrator, database, fake=False, **kwargs): class RemoteProxyGroup(pw.Model): """Groups multiple remote proxies together with common data.""" MANUAL = "manual" IMUNIFY360 = "imunify360" name = pw.CharField(null=False) source = pw.CharField( null=False, constraints=[ pw.Check("source in ('{}', '{}')".format(MANUAL, IMUNIFY360)) ], ) enabled = pw.BooleanField(null=False, default=True) class Meta: db_table = "remote_proxy_group" indexes = ((("name", "source"), True),) class RemoteProxy(pw.Model): group = pw.ForeignKeyField(RemoteProxyGroup, null=False) network = pw.TextField(null=False) class Meta: db_table = "remote_proxy" migrator.create_model(RemoteProxyGroup) migrator.create_model(RemoteProxy) def rollback(migrator, database, fake=False, **kwargs): RemoteProxy = migrator.orm["remote_proxy"] RemoteProxyGroup = migrator.orm["remote_proxy_group"] migrator.remove_model(RemoteProxy) migrator.remove_model(RemoteProxyGroup)
💾 Save Changes
❌ Cancel