Skip to content

Commit

Permalink
db: Update foreign key deletion behavior in usertrafficlog model
Browse files Browse the repository at this point in the history
  • Loading branch information
Ehco1996 committed Dec 17, 2023
1 parent 82f2297 commit 54778a2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/proxy/migrations/0005_auto_20210506_1950.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Migration(migrations.Migration):
model_name="usertrafficlog",
name="proxy_node",
field=models.ForeignKey(
on_delete=django.db.models.deletion.DO_NOTHING,
on_delete=django.db.models.deletion.CASCADE,
to="proxy.proxynode",
verbose_name="代理节点",
),
Expand All @@ -48,7 +48,7 @@ class Migration(migrations.Migration):
name="user",
field=models.ForeignKey(
null=True,
on_delete=django.db.models.deletion.DO_NOTHING,
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
verbose_name="用户",
),
Expand Down
17 changes: 17 additions & 0 deletions apps/proxy/migrations/0020_alter_proxynode_ehco_reload_interval.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.6 on 2023-12-17 03:16

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("proxy", "0019_proxynode_ehco_reload_interval"),
]

operations = [
migrations.AlterField(
model_name="proxynode",
name="ehco_reload_interval",
field=models.IntegerField(default=0, verbose_name="配置重载间隔"),
),
]

0 comments on commit 54778a2

Please sign in to comment.