-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migration to revert the creation of annotation.pk
- Loading branch information
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
h/migrations/versions/77bc5b4f2205_revert_annotation_pk.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,17 @@ | ||
"""Revert creation of annotation.pk.""" | ||
from alembic import op | ||
from sqlalchemy.schema import CreateSequence, DropSequence, Sequence | ||
|
||
revision = "77bc5b4f2205" | ||
down_revision = "5d1abac3c1a1" | ||
|
||
|
||
def upgrade(): | ||
op.execute(DropSequence(Sequence("annotation_id_seq"))) | ||
op.drop_constraint(op.f("uq__annotation__pk"), "annotation", type_="unique") | ||
op.drop_column("annotation", "pk") | ||
|
||
|
||
def downgrade(): | ||
"""No downgrade, check version f064c2b2e04a.""" | ||
pass |