-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from SaaShup/fix_dnsrecord_unicity_logic
🗃️ 👔 Change DNS record unicity logic
- Loading branch information
Showing
7 changed files
with
514 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ class NetBoxCloudflareConfig(PluginConfig): | |
name = "netbox_cloudflare_plugin" | ||
verbose_name = " NetBox Cloudflare Plugin" | ||
description = "Manage Cloudflare" | ||
version = "0.2.0" | ||
version = "0.3.0" | ||
base_url = "cloudflare" | ||
min_version = "4.0.0" | ||
author= "Vincent Simonin <[email protected]>" | ||
|
34 changes: 34 additions & 0 deletions
34
...ve_dnsrecord_netbox_cloudflare_plugin_dnsrecord_unique_zone_name_type_content_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# pylint: disable=C0103 | ||
"""Migration file""" | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
"""Migration file""" | ||
|
||
dependencies = [ | ||
("netbox_cloudflare_plugin", "0002_alter_dnsrecord_record_id"), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveConstraint( | ||
model_name="dnsrecord", | ||
name="netbox_cloudflare_plugin_dnsrecord_unique_zone_name_type_content", | ||
), | ||
migrations.AddConstraint( | ||
model_name="dnsrecord", | ||
constraint=models.UniqueConstraint( | ||
fields=("zone", "name", "type", "content"), | ||
name="netbox_cloudflare_plugin_dnsrecord_unique_zone_name_type_content", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="dnsrecord", | ||
constraint=models.UniqueConstraint( | ||
condition=models.Q(("proxied", True)), | ||
fields=("zone", "name", "type"), | ||
name="netbox_cloudflare_plugin_dnsrecord_unique_zone_name_type", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.