def migrate(migrator, database, fake=False, **kwargs): IPListModel = migrator.orm["iplist"] IPListModel.update(expiration=IPListModel.dos_expiration).where( (IPListModel.listname == "GRAY") & (IPListModel.expiration < IPListModel.dos_expiration) ).execute() def rollback(migrator, database, fake=False, **kwargs): pass