-
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.
- Loading branch information
Showing
38 changed files
with
411 additions
and
812 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
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
24 changes: 0 additions & 24 deletions
24
app/config_management/migrations/0008_alter_configgrouphostshistory_child_model_and_more.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
82 changes: 82 additions & 0 deletions
82
app/core/migrations/0015_modelhistory_manufacturerhistory_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,82 @@ | ||
# Generated by Django 5.1.5 on 2025-02-20 13:25 | ||
|
||
import access.fields | ||
import django.db.models.deletion | ||
import django.utils.timezone | ||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('access', '0003_alter_team_organization_organizationnotes_teamnotes'), | ||
('contenttypes', '0002_remove_content_type_name'), | ||
('core', '0014_data_move_notes_to_new_table'), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='ModelHistory', | ||
fields=[ | ||
('id', models.AutoField(help_text='ID of the item', primary_key=True, serialize=False, unique=True, verbose_name='ID')), | ||
('is_global', models.BooleanField(default=False, help_text='Is this a global object?', verbose_name='Global Object')), | ||
('before', models.JSONField(blank=True, default=None, help_text='JSON Object before Change', null=True, verbose_name='Before')), | ||
('after', models.JSONField(blank=True, default=None, help_text='JSON Object After Change', null=True, verbose_name='After')), | ||
('action', models.IntegerField(choices=[(1, 'Create'), (2, 'Update'), (3, 'Delete')], default=None, help_text='History action performed', null=True, verbose_name='Action')), | ||
('created', access.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, help_text='Date and time of creation', verbose_name='Created')), | ||
('content_type', models.ForeignKey(blank=True, help_text='Model this note is for', on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype', verbose_name='Content Model')), | ||
('organization', models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='access.organization', verbose_name='Organization')), | ||
('user', models.ForeignKey(help_text='User whom performed the action this history relates to', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL, verbose_name='User')), | ||
], | ||
options={ | ||
'verbose_name': 'History', | ||
'verbose_name_plural': 'History', | ||
'db_table': 'core_model_history', | ||
'ordering': ['-created'], | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='ManufacturerHistory', | ||
fields=[ | ||
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')), | ||
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='core.manufacturer', verbose_name='Model')), | ||
], | ||
options={ | ||
'verbose_name': 'Manufacturer History', | ||
'verbose_name_plural': 'Manufacturer History', | ||
'db_table': 'core_manufacturer_history', | ||
'ordering': ['-created'], | ||
}, | ||
bases=('core.modelhistory',), | ||
), | ||
migrations.CreateModel( | ||
name='TicketCategoryHistory', | ||
fields=[ | ||
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')), | ||
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='core.ticketcategory', verbose_name='Model')), | ||
], | ||
options={ | ||
'verbose_name': 'Ticket Category History', | ||
'verbose_name_plural': 'Ticket Category History', | ||
'db_table': 'core_ticketcategory_history', | ||
'ordering': ['-created'], | ||
}, | ||
bases=('core.modelhistory',), | ||
), | ||
migrations.CreateModel( | ||
name='TicketCommentCategoryHistory', | ||
fields=[ | ||
('modelhistory_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='core.modelhistory')), | ||
('model', models.ForeignKey(help_text='Model this note belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='history', to='core.ticketcommentcategory', verbose_name='Model')), | ||
], | ||
options={ | ||
'verbose_name': 'Ticket Comment Category History', | ||
'verbose_name_plural': 'Ticket Comment Category History', | ||
'db_table': 'core_ticketcommentcategory_history', | ||
'ordering': ['-created'], | ||
}, | ||
bases=('core.modelhistory',), | ||
), | ||
] |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
app/core/migrations/0020_alter_modelhistory_organization.py
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.