sync from local backup
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def delete_slider_captcha_tool(apps, schema_editor):
|
||||
"""从工具数据库中删除滑块验证码工具"""
|
||||
Tool = apps.get_model('tool', 'Tool')
|
||||
deleted_count, _ = Tool.objects.filter(url_path='/utility/slider-captcha').delete()
|
||||
if deleted_count:
|
||||
print(f'已删除 {deleted_count} 个滑块验证码工具记录')
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('tool', '0004_toolfavorite'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(delete_slider_captcha_tool),
|
||||
]
|
||||
Reference in New Issue
Block a user