-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously the index was unique among site and name. Add resource_name since making Attribute more generic
- Loading branch information
Showing
2 changed files
with
31 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,30 @@ | ||
"""empty message | ||
Revision ID: 2693d64d08b6 | ||
Revises: 5678f0574a6d | ||
Create Date: 2015-01-23 10:43:13.085148 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '2693d64d08b6' | ||
down_revision = '5678f0574a6d' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index('name_idx', table_name='attributes') | ||
op.create_index('name_idx', 'attributes', ['site_id', 'resource_name', 'name'], unique=True) | ||
### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index('name_idx', table_name='attributes') | ||
op.create_index('name_idx', 'attributes', ['site_id', 'name'], unique=1) | ||
### 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