-
Notifications
You must be signed in to change notification settings - Fork 26
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 #236 from nautobot/u/gas-squash-migrations
squash and fix 2.0 migrations
- Loading branch information
Showing
5 changed files
with
221 additions
and
110 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
nautobot_device_lifecycle_mgmt/migrations/0004_squash__0004_0014_0015_0016.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,72 @@ | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("dcim", "0005_device_local_context_schema"), | ||
("extras", "0013_default_fallback_value_computedfield"), | ||
("nautobot_device_lifecycle_mgmt", "0003_service_contracts"), | ||
] | ||
|
||
replaces = [ | ||
("nautobot_device_lifecycle_mgmt", "0004_validated_software_m2m"), | ||
("nautobot_device_lifecycle_mgmt", "0014_pre_nautobot_v2_migrations"), | ||
("nautobot_device_lifecycle_mgmt", "0015_role_migration"), | ||
("nautobot_device_lifecycle_mgmt", "0016_role_migration_cleanup"), | ||
] | ||
|
||
operations = [ | ||
# 0004_validated_software_m2m | ||
migrations.AlterModelOptions( | ||
name="softwarelcm", | ||
options={ | ||
"ordering": ("device_platform", "version", "end_of_support", "release_date"), | ||
"verbose_name": "Software", | ||
}, | ||
), | ||
migrations.AddField( | ||
model_name="validatedsoftwarelcm", | ||
name="device_roles", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="_validatedsoftwarelcm_device_roles_+", to="extras.Role" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="validatedsoftwarelcm", | ||
name="device_types", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="_validatedsoftwarelcm_device_types_+", to="dcim.DeviceType" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="validatedsoftwarelcm", | ||
name="devices", | ||
field=models.ManyToManyField(blank=True, related_name="_validatedsoftwarelcm_devices_+", to="dcim.Device"), | ||
), | ||
migrations.AddField( | ||
model_name="validatedsoftwarelcm", | ||
name="inventory_items", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="_validatedsoftwarelcm_inventory_items_+", to="dcim.InventoryItem" | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="validatedsoftwarelcm", | ||
name="object_tags", | ||
field=models.ManyToManyField( | ||
blank=True, related_name="_validatedsoftwarelcm_object_tags_+", to="extras.Tag" | ||
), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="validatedsoftwarelcm", | ||
unique_together=set(), | ||
), | ||
migrations.RemoveField( | ||
model_name="validatedsoftwarelcm", | ||
name="assigned_to_content_type", | ||
), | ||
migrations.RemoveField( | ||
model_name="validatedsoftwarelcm", | ||
name="assigned_to_object_id", | ||
), | ||
] |
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
127 changes: 127 additions & 0 deletions
127
nautobot_device_lifecycle_mgmt/migrations/0020_alter_created_tags.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,127 @@ | ||
from django.db import migrations, models | ||
|
||
import nautobot.core.models.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("nautobot_device_lifecycle_mgmt", "0001_hardwarelcm"), | ||
("nautobot_device_lifecycle_mgmt", "0002_softwarelcm"), | ||
("nautobot_device_lifecycle_mgmt", "0003_service_contracts"), | ||
("nautobot_device_lifecycle_mgmt", "0005_software_reporting"), | ||
("nautobot_device_lifecycle_mgmt", "0006_cvelcm_vulnerabilitylcm"), | ||
("nautobot_device_lifecycle_mgmt", "0007_softwareimagelcm"), | ||
# This migration does not actually depend on the below migrations but they are added here to | ||
# prevent Django from failing to migrate due to multiple leaf nodes in the migration graph | ||
("nautobot_device_lifecycle_mgmt", "0013_alter_softwareimagelcm_device_types"), | ||
("nautobot_device_lifecycle_mgmt", "0016_role_migration_cleanup"), | ||
("nautobot_device_lifecycle_mgmt", "0019_cve_and_contract_m2m_migration"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="contactlcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="contactlcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="contractlcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="contractlcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="cvelcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="cvelcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="devicesoftwarevalidationresult", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="devicesoftwarevalidationresult", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="hardwarelcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="hardwarelcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="inventoryitemsoftwarevalidationresult", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="inventoryitemsoftwarevalidationresult", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="providerlcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="softwareimagelcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="softwareimagelcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="softwarelcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="softwarelcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="validatedsoftwarelcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="validatedsoftwarelcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
migrations.AlterField( | ||
model_name="vulnerabilitylcm", | ||
name="created", | ||
field=models.DateTimeField(auto_now_add=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name="vulnerabilitylcm", | ||
name="tags", | ||
field=nautobot.core.models.fields.TagsField(through="extras.TaggedItem", to="extras.Tag"), | ||
), | ||
] |