-
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.
Merge pull request #512 from bcgov/dev-marshal-DV-4299
patroni log error - duplicate annotation key
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
"""empty message | ||
Revision ID: 13766f2831b6 | ||
Revises: 36e7b771fbb5 | ||
Create Date: 2023-10-03 13:53:19.344756 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = "13766f2831b6" | ||
down_revision = "36e7b771fbb5" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
op.execute( | ||
'ALTER TABLE public."Annotations" DROP CONSTRAINT "annotation_version_key";' | ||
) | ||
op.execute( | ||
'ALTER TABLE public."Annotations" ADD CONSTRAINT annotation_version_redactionlayerid_key UNIQUE (annotationname, version, redactionlayerid);' | ||
) | ||
|
||
|
||
def downgrade(): | ||
op.execute( | ||
'ALTER TABLE public."Annotations" DROP CONSTRAINT "annotation_version_redactionlayerid_key";' | ||
) |
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