kopia lustrzana https://github.com/bugout-dev/moonstream
33 wiersze
1.1 KiB
Python
33 wiersze
1.1 KiB
Python
"""Unique const for addr
|
|
|
|
Revision ID: ea8185bd24c7
|
|
Revises: 40871a7807f6
|
|
Create Date: 2021-08-18 09:41:00.512462
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'ea8185bd24c7'
|
|
down_revision = '40871a7807f6'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_index('ix_ethereum_addresses_address', table_name='ethereum_addresses')
|
|
op.create_index(op.f('ix_ethereum_addresses_address'), 'ethereum_addresses', ['address'], unique=True)
|
|
op.create_unique_constraint(op.f('uq_ethereum_labels_id'), 'ethereum_labels', ['id'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(op.f('uq_ethereum_labels_id'), 'ethereum_labels', type_='unique')
|
|
op.drop_index(op.f('ix_ethereum_addresses_address'), table_name='ethereum_addresses')
|
|
op.create_index('ix_ethereum_addresses_address', 'ethereum_addresses', ['address'], unique=False)
|
|
# ### end Alembic commands ###
|