-
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.
Add unique constraints to pay uplift and attrition
- Loading branch information
1 parent
dc3adae
commit ec69ac4
Showing
2 changed files
with
71 additions
and
5 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
core/migrations/0018_alter_attrition_cost_centre_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,51 @@ | ||
# Generated by Django 5.1.3 on 2024-12-10 13:53 | ||
|
||
import django.db.models.deletion | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("core", "0017_alter_attrition_cost_centre_and_more"), | ||
("costcentre", "0008_alter_simplehistoryarchivedcostcentre_options_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="attrition", | ||
name="cost_centre", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=django.db.models.deletion.PROTECT, | ||
to="costcentre.costcentre", | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="attrition", | ||
name="financial_year", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.PROTECT, to="core.financialyear" | ||
), | ||
), | ||
migrations.AlterField( | ||
model_name="payuplift", | ||
name="financial_year", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.PROTECT, to="core.financialyear" | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="attrition", | ||
constraint=models.UniqueConstraint( | ||
fields=("financial_year", "cost_centre"), name="unique_attrition" | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="payuplift", | ||
constraint=models.UniqueConstraint( | ||
fields=("financial_year",), name="unique_pay_uplift" | ||
), | ||
), | ||
] |
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