-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
49 additions
and
4 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
migrations/versions/e9c68e8f78c2_add_index_to_favouriteproposal.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 @@ | ||
"""Add index to FavouriteProposal | ||
Revision ID: e9c68e8f78c2 | ||
Revises: e27e0646278c | ||
Create Date: 2024-05-31 21:43:02.680838 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'e9c68e8f78c2' | ||
down_revision = 'e27e0646278c' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.create_index(op.f('ix_favourite_proposal_proposal_id'), 'favourite_proposal', ['proposal_id'], unique=False) | ||
op.alter_column('feature_flag_version', 'enabled', | ||
existing_type=sa.BOOLEAN(), | ||
nullable=True, | ||
autoincrement=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('feature_flag_version', 'enabled', | ||
existing_type=sa.BOOLEAN(), | ||
nullable=False, | ||
autoincrement=False) | ||
op.drop_index(op.f('ix_favourite_proposal_proposal_id'), table_name='favourite_proposal') | ||
# ### end Alembic commands ### |
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