-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove unapplicable conditional unique constraint on subsidy
ENT-7891 | MySQL has never supported conditional unique constraints. This commit removes a conditional unique constraint declared in the subsidy model's Meta class. It also has a no-op migration for same. Lastly, adds a migration for historical subsidy records from upgraded django-simple-history.
- Loading branch information
1 parent
190a779
commit ecfd36d
Showing
3 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
enterprise_subsidy/apps/subsidy/migrations/0019_alter_historicalsubsidy_options.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,17 @@ | ||
# Generated by Django 3.2.19 on 2023-10-31 13:02 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('subsidy', '0018_alter_historicalsubsidy_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name='historicalsubsidy', | ||
options={'get_latest_by': 'history_date', 'ordering': ('-history_date', '-history_id'), 'verbose_name': 'historical subsidy'}, | ||
), | ||
] |
17 changes: 17 additions & 0 deletions
17
...e_subsidy/apps/subsidy/migrations/0020_remove_subsidy_unique_reference_id_non_internal.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,17 @@ | ||
# Generated by Django 3.2.19 on 2023-10-31 13:04 | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('subsidy', '0019_alter_historicalsubsidy_options'), | ||
] | ||
|
||
operations = [ | ||
migrations.RemoveConstraint( | ||
model_name='subsidy', | ||
name='unique_reference_id_non_internal', | ||
), | ||
] |
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