diff --git a/Release-Notes.md b/Release-Notes.md index bb502d63..002902be 100644 --- a/Release-Notes.md +++ b/Release-Notes.md @@ -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. diff --git a/app/itam/migrations/0016_alter_devicemodel_manufacturer.py b/app/itam/migrations/0016_alter_devicemodel_manufacturer.py new file mode 100644 index 00000000..7387aed8 --- /dev/null +++ b/app/itam/migrations/0016_alter_devicemodel_manufacturer.py @@ -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", + ), + ), + ] diff --git a/app/itam/models/device_models.py b/app/itam/models/device_models.py index b77afeee..3741479c 100644 --- a/app/itam/models/device_models.py +++ b/app/itam/models/device_models.py @@ -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' ) diff --git a/docs/projects/centurion_erp/user/core/markdown.md b/docs/projects/centurion_erp/user/core/markdown.md index 0449d346..99695939 100644 --- a/docs/projects/centurion_erp/user/core/markdown.md +++ b/docs/projects/centurion_erp/user/core/markdown.md @@ -77,7 +77,7 @@ A Model link is a reference to an item within the database. Supported model link | clustertype| `$-` | | config groups| `$config_group-` | | device| `$device-` | -| devicemodel| `$-` | +| devicemodel| `$device_model-` | | devicetype| `$-` | | entity | `$entity-` | | externallink| `$-` |