2016-01-21 16:53:53 +00:00
|
|
|
"""empty message
|
|
|
|
|
|
2016-01-22 14:52:07 +00:00
|
|
|
Revision ID: 0009_unique_service_to_key_name
|
2016-01-21 16:53:53 +00:00
|
|
|
Revises: 0007_change_to_api_keys
|
|
|
|
|
Create Date: 2016-01-21 16:14:51.773001
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
2016-01-22 14:52:07 +00:00
|
|
|
revision = '0009_unique_service_to_key_name'
|
|
|
|
|
down_revision = '0008_add_verify_codes'
|
2016-01-21 16:53:53 +00:00
|
|
|
|
|
|
|
|
from alembic import op
|
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
|
|
|
op.create_unique_constraint('uix_service_to_key_name', 'api_key', ['service_id', 'name'])
|
|
|
|
|
### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
|
### commands auto generated by Alembic - please adjust! ###
|
|
|
|
|
op.drop_constraint('uix_service_to_key_name', 'api_key', type_='unique')
|
|
|
|
|
### end Alembic commands ###
|