-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1235 from rapidpro/fix-index-together-unique-togh…
…ether-use Fix index_together unique_together use
- Loading branch information
Showing
12 changed files
with
286 additions
and
15 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...igrations/0028_rename_reporterscounter_org_type_contacts_rptrscntr_org_id_idx_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,29 @@ | ||
# Generated by Django 5.0.8 on 2024-08-23 13:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("contacts", "0027_install_triggers"), | ||
("orgs", "0033_rename_orgs_orgbac_org_id_607508_idx_orgs_orgbac_org_slug_idx_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameIndex( | ||
model_name="reporterscounter", | ||
new_name="contacts_rptrscntr_org_id_idx", | ||
old_fields=("org", "type"), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="contact", | ||
unique_together=set(), | ||
), | ||
migrations.AddConstraint( | ||
model_name="contact", | ||
constraint=models.UniqueConstraint( | ||
fields=("org", "uuid"), name="contacts_contact_org_id_563dcefdcba190b9_uniq" | ||
), | ||
), | ||
] |
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
25 changes: 25 additions & 0 deletions
25
ureport/flows/migrations/0002_alter_flowresult_unique_together_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,25 @@ | ||
# Generated by Django 5.0.8 on 2024-08-23 13:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("flows", "0001_initial"), | ||
("orgs", "0033_rename_orgs_orgbac_org_id_607508_idx_orgs_orgbac_org_slug_idx_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterUniqueTogether( | ||
name="flowresult", | ||
unique_together=set(), | ||
), | ||
migrations.AddConstraint( | ||
model_name="flowresult", | ||
constraint=models.UniqueConstraint( | ||
fields=("org", "flow_uuid", "result_uuid"), | ||
name="flows_flowresult_org_id_flow_uuid_result_uuid_5efa8f2d_uniq", | ||
), | ||
), | ||
] |
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
31 changes: 31 additions & 0 deletions
31
ureport/landingpages/migrations/0005_alter_landingpage_unique_together_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,31 @@ | ||
# Generated by Django 5.0.8 on 2024-08-23 13:00 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("bots", "0006_alter_bot_created_by_alter_bot_modified_by"), | ||
("landingpages", "0004_alter_landingpage_created_by_and_more"), | ||
("orgs", "0033_rename_orgs_orgbac_org_id_607508_idx_orgs_orgbac_org_slug_idx_and_more"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterUniqueTogether( | ||
name="landingpage", | ||
unique_together=set(), | ||
), | ||
migrations.AlterIndexTogether( | ||
name="landingpage", | ||
index_together=set(), | ||
), | ||
migrations.AddConstraint( | ||
model_name="landingpage", | ||
constraint=models.UniqueConstraint( | ||
fields=("org", "slug"), name="landingpages_landingpage_org_id_slug_f7f1304e_uniq" | ||
), | ||
), | ||
] |
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
29 changes: 29 additions & 0 deletions
29
...ons/0008_rename_boundary_org_level_name_osm_id_locations_bd_org_lv_nm_osm_idx_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,29 @@ | ||
# Generated by Django 5.0.8 on 2024-08-23 13:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("locations", "0007_alter_boundary_index_together"), | ||
("orgs", "0033_rename_orgs_orgbac_org_id_607508_idx_orgs_orgbac_org_slug_idx_and_more"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameIndex( | ||
model_name="boundary", | ||
new_name="locations_bd_org_lv_nm_osm_idx", | ||
old_fields=("org", "level", "name", "osm_id"), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="boundary", | ||
unique_together=set(), | ||
), | ||
migrations.AddConstraint( | ||
model_name="boundary", | ||
constraint=models.UniqueConstraint( | ||
fields=("org", "osm_id"), name="locations_boundary_org_id_5c2d99160b82334a_uniq" | ||
), | ||
), | ||
] |
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
80 changes: 80 additions & 0 deletions
80
...lls/migrations/0077_rename_poll_org_published_id_polls_poll_org_pblshd_id_idx_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,80 @@ | ||
# Generated by Django 5.0.8 on 2024-08-23 13:00 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("flows", "0002_alter_flowresult_unique_together_and_more"), | ||
("orgs", "0033_rename_orgs_orgbac_org_id_607508_idx_orgs_orgbac_org_slug_idx_and_more"), | ||
("polls", "0076_alter_poll_index_together"), | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameIndex( | ||
model_name="poll", | ||
new_name="polls_poll_org_pblshd_id_idx", | ||
old_fields=("org", "published", "id"), | ||
), | ||
migrations.RenameIndex( | ||
model_name="pollquestion", | ||
new_name="polls_qstn_poll_actv_fl_rs_idx", | ||
old_fields=("poll", "is_active", "flow_result"), | ||
), | ||
migrations.RenameIndex( | ||
model_name="pollresult", | ||
new_name="polls_rslt_org_flw_rst_txt_idx", | ||
old_fields=("org", "flow", "ruleset", "text"), | ||
), | ||
migrations.RenameIndex( | ||
model_name="pollresult", | ||
new_name="polls_pollresult_org_flow_idx", | ||
old_fields=("org", "flow"), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="pollcategory", | ||
unique_together=set(), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="pollquestion", | ||
unique_together=set(), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="pollresponsecategory", | ||
unique_together=set(), | ||
), | ||
migrations.AddConstraint( | ||
model_name="pollcategory", | ||
constraint=models.UniqueConstraint( | ||
fields=("name", "org"), name="polls_pollcategory_name_156693e034f96627_uniq" | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="pollquestion", | ||
constraint=models.UniqueConstraint( | ||
fields=("poll", "flow_result"), name="polls_pollquestion_poll_id_flow_result_id_608a2446_uniq" | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="pollquestion", | ||
constraint=models.UniqueConstraint( | ||
fields=("poll", "ruleset_uuid"), name="polls_pollquestion_poll_id_4202706c8106f06_uniq" | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="pollresponsecategory", | ||
constraint=models.UniqueConstraint( | ||
fields=("question", "rule_uuid"), name="polls_pollresponsecategory_question_id_3a161715511bd77d_uniq" | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="pollresponsecategory", | ||
constraint=models.UniqueConstraint( | ||
fields=("question", "flow_result_category"), | ||
name="polls_pollresponsecatego_question_id_flow_result__4db1cb7e_uniq", | ||
), | ||
), | ||
] |
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
34 changes: 34 additions & 0 deletions
34
...ations/0029_rename_contactactivity_org_contact_stats_ct_actvt_org_contact_idx_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,34 @@ | ||
# Generated by Django 5.0.8 on 2024-08-23 13:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("orgs", "0033_rename_orgs_orgbac_org_id_607508_idx_orgs_orgbac_org_slug_idx_and_more"), | ||
("stats", "0028_activities_counter_triggers"), | ||
] | ||
|
||
operations = [ | ||
migrations.RenameIndex( | ||
model_name="contactactivity", | ||
new_name="stats_ct_actvt_org_contact_idx", | ||
old_fields=("org", "contact"), | ||
), | ||
migrations.RenameIndex( | ||
model_name="contactactivity", | ||
new_name="stats_ct_actvt_org_date_idx", | ||
old_fields=("org", "date"), | ||
), | ||
migrations.AlterUniqueTogether( | ||
name="contactactivity", | ||
unique_together=set(), | ||
), | ||
migrations.AddConstraint( | ||
model_name="contactactivity", | ||
constraint=models.UniqueConstraint( | ||
fields=("org", "contact", "date"), name="stats_contactactivity_org_id_contact_date_348227aa_uniq" | ||
), | ||
), | ||
] |
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