refactor(devops): Migration for updating model inheritance for DeviceModel model
ref:#817 #800
This commit is contained in:
@ -1,5 +1,15 @@
|
||||
## Version 1.18.0
|
||||
|
||||
- Added new model for History
|
||||
|
||||
!!! info
|
||||
Migration of the old history tables to the new history tables occurs as part of post migration. As such the time it will take to migrate the history is dependent upon how many history entries per model. This should be planned for when upgrading to this version. if for some reason the migration is interrupted, you can safely restart it again by running the migrate command.
|
||||
|
||||
- Added new model for notes
|
||||
|
||||
!!! info
|
||||
Migration of the old notes tables to the new note tables occurs as part of post migration. As such the time it will take to migrate the history is dependent upon how many history entries per model. This should be planned for when upgrading to this version. if for some reason the migration is interrupted, you can safely restart it again by running the migrate command.
|
||||
|
||||
- Removed Django UI
|
||||
|
||||
[UI](https://github.com/nofusscomputing/centurion_erp) must be deployed seperatly.
|
||||
|
27
app/itam/migrations/0016_alter_devicemodel_manufacturer.py
Normal file
27
app/itam/migrations/0016_alter_devicemodel_manufacturer.py
Normal file
@ -0,0 +1,27 @@
|
||||
# Generated by Django 5.1.9 on 2025-06-11 06:58
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("core", "0033_alter_ticketcommentcategory_parent_and_more"),
|
||||
("itam", "0015_alter_device_config_alter_device_device_model_and_more"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="devicemodel",
|
||||
name="manufacturer",
|
||||
field=models.ForeignKey(
|
||||
blank=True,
|
||||
help_text="Manufacturer this model is from",
|
||||
null=True,
|
||||
on_delete=django.db.models.deletion.PROTECT,
|
||||
to="core.manufacturer",
|
||||
verbose_name="Manufacturer",
|
||||
),
|
||||
),
|
||||
]
|
@ -14,6 +14,8 @@ class DeviceModel(
|
||||
CenturionModel
|
||||
):
|
||||
|
||||
model_tag = 'device_model'
|
||||
|
||||
|
||||
class Meta:
|
||||
|
||||
@ -37,11 +39,10 @@ class DeviceModel(
|
||||
|
||||
manufacturer = models.ForeignKey(
|
||||
Manufacturer,
|
||||
blank= True,
|
||||
default = None,
|
||||
blank = True,
|
||||
help_text = 'Manufacturer this model is from',
|
||||
null = True,
|
||||
on_delete=models.SET_DEFAULT,
|
||||
on_delete = models.PROTECT,
|
||||
verbose_name = 'Manufacturer'
|
||||
)
|
||||
|
||||
|
@ -77,7 +77,7 @@ A Model link is a reference to an item within the database. Supported model link
|
||||
| clustertype| `$-<id>` |
|
||||
| config groups| `$config_group-<id>` |
|
||||
| device| `$device-<id>` |
|
||||
| devicemodel| `$-<id>` |
|
||||
| devicemodel| `$device_model-<id>` |
|
||||
| devicetype| `$-<id>` |
|
||||
| entity | `$entity-<id>` |
|
||||
| externallink| `$-<id>` |
|
||||
|
Reference in New Issue
Block a user