Sindbad~EG File Manager

Current Path : /proc/thread-self/root/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/
Upload File :
Current File : //proc/thread-self/root/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/migrations/073_drop_dos_expiration.py

import logging

import peewee as pw

logger = logging.getLogger(__name__)


def migrate(migrator, database, fake=False, **kwargs):
    """Write your migrations here."""
    IPList = migrator.orm["iplist"]
    migrator.add_fields(
        IPList,
        no_captcha=pw.BooleanField(null=False, default=False),
    )
    migrator.sql(
        "UPDATE iplist SET no_captcha=1 "
        "WHERE listname='GRAY' AND dos_expiration"
    )
    migrator.remove_fields(IPList, "dos_expiration")


def rollback(migrator, database, fake=False, **kwargs):
    """Write your rollback migrations here."""
    pass

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists