-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: drop postgres specific IntegerRangeField
it's not intuitive if the upper bound is excluded so use a start/end field combination and include start and end in the query.
- Loading branch information
Showing
9 changed files
with
123 additions
and
27 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
70 changes: 70 additions & 0 deletions
70
...-kitamanager/kitamanager/migrations/0004_alter_childpaymenttableentry_options_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,70 @@ | ||
# Generated by Django 5.0.2 on 2024-02-22 14:12 | ||
|
||
import django.core.validators | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("kitamanager", "0003_childpaymenttable_hours"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterModelOptions( | ||
name="childpaymenttableentry", | ||
options={"ordering": ("table", "age_start", "age_end", "name")}, | ||
), | ||
migrations.RemoveConstraint( | ||
model_name="childpaymenttableentry", | ||
name="kitamanager_childpaymenttableentry_table_age_name", | ||
), | ||
migrations.RemoveIndex( | ||
model_name="childpaymenttableentry", | ||
name="kitamanager_age_c3e652_idx", | ||
), | ||
migrations.RemoveField( | ||
model_name="childpaymenttableentry", | ||
name="age", | ||
), | ||
migrations.AddField( | ||
model_name="childpaymenttableentry", | ||
name="age_end", | ||
field=models.PositiveSmallIntegerField( | ||
default=0, | ||
help_text="age end (in years) range for this property", | ||
validators=[ | ||
django.core.validators.MinValueValidator(0), | ||
django.core.validators.MaxValueValidator(8), | ||
], | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name="childpaymenttableentry", | ||
name="age_start", | ||
field=models.PositiveSmallIntegerField( | ||
default=0, | ||
help_text="age start (in years) range for this property", | ||
validators=[ | ||
django.core.validators.MinValueValidator(0), | ||
django.core.validators.MaxValueValidator(8), | ||
], | ||
), | ||
preserve_default=False, | ||
), | ||
migrations.AddIndex( | ||
model_name="childpaymenttableentry", | ||
index=models.Index( | ||
fields=["age_start", "age_end", "name", "pay", "requirement"], | ||
name="kitamanager_age_sta_7bde4f_idx", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="childpaymenttableentry", | ||
constraint=models.UniqueConstraint( | ||
fields=("table", "age_start", "age_end", "name"), | ||
name="kitamanager_childpaymenttableentry_table_age_start_age_end_name", | ||
), | ||
), | ||
] |
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
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