Blame alembic/versions/802047d28f89_drop_unique_constraint_on_commit_uid.py
|
Pierre-Yves Chibon |
6a7b20 |
"""Drop unique constraint on commit UID
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
Revision ID: 802047d28f89
|
|
Pierre-Yves Chibon |
6a7b20 |
Revises: 5a2327825b9a
|
|
Pierre-Yves Chibon |
6a7b20 |
Create Date: 2019-05-06 12:52:25.221300
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
"""
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
from alembic import op
|
|
Pierre-Yves Chibon |
6a7b20 |
import sqlalchemy as sa
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
# revision identifiers, used by Alembic.
|
|
Pierre-Yves Chibon |
6a7b20 |
revision = '802047d28f89'
|
|
Pierre-Yves Chibon |
6a7b20 |
down_revision = '5a2327825b9a'
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
def upgrade():
|
|
Pierre-Yves Chibon |
6a7b20 |
""" Remove the constraint named: commit_flags_uid_key, pass otherwise. """
|
|
Pierre-Yves Chibon |
6a7b20 |
try:
|
|
Pierre-Yves Chibon |
6a7b20 |
op.drop_constraint('commit_flags_uid_key', 'commit_flags')
|
|
Pierre-Yves Chibon |
6a7b20 |
except:
|
|
Pierre-Yves Chibon |
6a7b20 |
pass
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
|
|
Pierre-Yves Chibon |
6a7b20 |
def downgrade():
|
|
Pierre-Yves Chibon |
6a7b20 |
""" We do not want to go back in fact. """
|
|
Pierre-Yves Chibon |
6a7b20 |
pass
|