관리-도구
편집 파일: 124_add_infected_domains_vendor.py
import logging import peewee as pw logger = logging.getLogger(__name__) def migrate(migrator, database, fake=False, **kwargs): InfectedDomains = migrator.orm["infected_domain_list"] migrator.add_fields( InfectedDomains, vendor=pw.TextField(null=False, default="google-safe-browsing"), ) InfectedDomains.delete().execute() def rollback(migrator, database, fake=False, **kwargs): pass