-
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 #1538 from digitalfabrik/enhancement/version-uniqu…
…e-constraint Add database constraints to enforce unique version numbers
- Loading branch information
Showing
7 changed files
with
114 additions
and
29 deletions.
There are no files selected for viewing
44 changes: 44 additions & 0 deletions
44
integreat_cms/cms/migrations/0031_unique_version_constraint.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,44 @@ | ||
# Generated by Django 3.2.13 on 2022-06-09 20:00 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
""" | ||
Ensure version numbers are unique for all content objects in each language. | ||
""" | ||
|
||
dependencies = [ | ||
("cms", "0030_alter_region_aliases"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddConstraint( | ||
model_name="eventtranslation", | ||
constraint=models.UniqueConstraint( | ||
fields=("event", "language", "version"), | ||
name="eventtranslation_unique_version", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="imprintpagetranslation", | ||
constraint=models.UniqueConstraint( | ||
fields=("page", "language", "version"), | ||
name="imprintpagetranslation_unique_version", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="pagetranslation", | ||
constraint=models.UniqueConstraint( | ||
fields=("page", "language", "version"), | ||
name="pagetranslation_unique_version", | ||
), | ||
), | ||
migrations.AddConstraint( | ||
model_name="poitranslation", | ||
constraint=models.UniqueConstraint( | ||
fields=("poi", "language", "version"), | ||
name="poitranslation_unique_version", | ||
), | ||
), | ||
] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: 1.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-06-08 20:12+0000\n" | ||
"POT-Creation-Date: 2022-06-09 22:40+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: Integreat <[email protected]>\n" | ||
"Language-Team: Integreat <[email protected]>\n" | ||
|
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