Skip to content

Commit

Permalink
chore: squash previous releases migrations
Browse files Browse the repository at this point in the history
Every release that occurs is squash ALL migrations to limit the amount of migrations

ref: #408 #417
  • Loading branch information
jon-nfc committed Dec 6, 2024
1 parent 17f4704 commit 8f83e74
Show file tree
Hide file tree
Showing 53 changed files with 299 additions and 1,169 deletions.
8 changes: 8 additions & 0 deletions Release-Notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Next Release

- When v1.4.0 was release the migrations were not merged. As part of the work conducted on this release the v1.4 migrations have been squashed. This should not have any effect on any system that when they updated to v1.4, they ran the migrations and they **completed successfully**. Upgrading from <1.4.0 to this release should also have no difficulties as the migrations required still exist. There are less of them, however with more work per migration.

!!! Note
If you require the previously squashed migrations for what ever reason. Clone the repo and go to commit 17f47040d6737905a1769eee5c45d9d15339fdbf, which is the commit prior to the squashing which is commit 6cb6e742f1e5a4cedd4bd47e443188752fd7bb8c.


## Version 1.4.0

API redesign in preparation for moving the UI out of centurion to it's [own project](https://github.com/nofusscomputing/centurion_erp_ui). This release introduces a **Feature freeze** to the current UI. Only bug fixes will be done for the current UI.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.2 on 2024-10-13 15:27
# Generated by Django 5.1.2 on 2024-12-06 06:47

import access.models
import django.db.models.deletion
Expand All @@ -9,11 +9,23 @@
class Migration(migrations.Migration):

dependencies = [
('access', '0002_alter_team_options'),
('access', '0001_initial'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]

operations = [
migrations.AlterModelOptions(
name='organization',
options={'ordering': ['name'], 'verbose_name': 'Organization', 'verbose_name_plural': 'Organizations'},
),
migrations.AlterModelOptions(
name='team',
options={'ordering': ['team_name'], 'verbose_name': 'Team', 'verbose_name_plural': 'Teams'},
),
migrations.AlterModelOptions(
name='teamusers',
options={'ordering': ['user'], 'verbose_name': 'Team User', 'verbose_name_plural': 'Team Users'},
),
migrations.AlterField(
model_name='organization',
name='id',
Expand Down Expand Up @@ -47,11 +59,31 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='team',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='team',
name='team_name',
field=models.CharField(default='', help_text='Name to give this team', max_length=50, verbose_name='Name'),
field=models.CharField(help_text='Name to give this team', max_length=50, verbose_name='Name'),
),
migrations.AlterField(
model_name='teamusers',
name='id',
field=models.AutoField(help_text='ID of this Team User', primary_key=True, serialize=False, unique=True, verbose_name='ID'),
),
migrations.AlterField(
model_name='teamusers',
name='manager',
field=models.BooleanField(blank=True, default=False, help_text='Is this user to be a manager of this team', verbose_name='manager'),
),
migrations.AlterField(
model_name='teamusers',
name='team',
field=models.ForeignKey(help_text='Team user belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='team', to='access.team', verbose_name='Team'),
),
migrations.AlterField(
model_name='teamusers',
name='user',
field=models.ForeignKey(help_text='User who will be added to the team', on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User'),
),
]
17 changes: 0 additions & 17 deletions app/access/migrations/0002_alter_team_options.py

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions app/access/migrations/0005_alter_team_team_name.py

This file was deleted.

20 changes: 0 additions & 20 deletions app/access/migrations/0006_alter_team_organization.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.2 on 2024-10-13 15:27
# Generated by Django 5.1.2 on 2024-12-06 06:47

import django.db.models.deletion
from django.conf import settings
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.2 on 2024-10-13 15:27
# Generated by Django 5.1.2 on 2024-12-06 06:47

import access.models
import django.db.models.deletion
Expand All @@ -8,11 +8,19 @@
class Migration(migrations.Migration):

dependencies = [
('access', '0003_alter_organization_id_alter_organization_manager_and_more'),
('access', '0002_alter_organization_options_alter_team_options_and_more'),
('assistance', '0001_initial'),
]

operations = [
migrations.AlterModelOptions(
name='knowledgebase',
options={'ordering': ['title'], 'verbose_name': 'Knowledge Base', 'verbose_name_plural': 'Knowledge Base Articles'},
),
migrations.AlterModelOptions(
name='knowledgebasecategory',
options={'ordering': ['name'], 'verbose_name': 'Knowledge Base Category', 'verbose_name_plural': 'Knowledge Base Categories'},
),
migrations.RemoveField(
model_name='knowledgebasecategory',
name='slug',
Expand All @@ -30,7 +38,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='knowledgebase',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='knowledgebasecategory',
Expand All @@ -50,6 +58,6 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='knowledgebasecategory',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
]

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Generated by Django 5.1.2 on 2024-10-13 15:27
# Generated by Django 5.1.2 on 2024-12-06 06:47

import access.models
import config_management.models.groups
Expand All @@ -9,12 +9,25 @@
class Migration(migrations.Migration):

dependencies = [
('access', '0003_alter_organization_id_alter_organization_manager_and_more'),
('config_management', '0005_alter_configgroupsoftware_options'),
('itam', '0014_alter_softwarecategory_options'),
('access', '0002_alter_organization_options_alter_team_options_and_more'),
('config_management', '0003_alter_configgroups_options_and_more'),
('itam', '0004_alter_deviceoperatingsystem_device_and_more'),
]

operations = [
migrations.AlterModelOptions(
name='configgroups',
options={'ordering': ['name'], 'verbose_name': 'Config Group', 'verbose_name_plural': 'Config Groups'},
),
migrations.AlterModelOptions(
name='configgroupsoftware',
options={'ordering': ['-action', 'software'], 'verbose_name': 'Config Group Software', 'verbose_name_plural': 'Config Group Softwares'},
),
migrations.AddField(
model_name='configgroups',
name='hosts',
field=models.ManyToManyField(blank=True, help_text='Hosts that are part of this group', to='itam.device', verbose_name='Hosts'),
),
migrations.AlterField(
model_name='configgrouphosts',
name='group',
Expand Down Expand Up @@ -43,7 +56,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='configgrouphosts',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='configgroups',
Expand Down Expand Up @@ -73,7 +86,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='configgroups',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='configgroups',
Expand All @@ -83,7 +96,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='configgroupsoftware',
name='action',
field=models.CharField(blank=True, choices=[('1', 'Install'), ('0', 'Remove')], default=None, help_text='ACtion to perform with this software', max_length=1, null=True, verbose_name='Action'),
field=models.IntegerField(blank=True, choices=[(1, 'Install'), (0, 'Remove')], default=None, help_text='ACtion to perform with this software', null=True, verbose_name='Action'),
),
migrations.AlterField(
model_name='configgroupsoftware',
Expand All @@ -108,7 +121,7 @@ class Migration(migrations.Migration):
migrations.AlterField(
model_name='configgroupsoftware',
name='organization',
field=models.ForeignKey(help_text='Organization this belongs to', null=True, on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
field=models.ForeignKey(help_text='Organization this belongs to', on_delete=django.db.models.deletion.CASCADE, to='access.organization', validators=[access.models.TenancyObject.validatate_organization_exists], verbose_name='Organization'),
),
migrations.AlterField(
model_name='configgroupsoftware',
Expand Down

This file was deleted.

Loading

0 comments on commit 8f83e74

Please sign in to comment.