mirror of
https://github.com/apache/superset.git
synced 2026-04-17 23:25:05 +00:00
* Change in files * Renamin files and folders * cleaning up a single piece of lint * Removing boat picture from docs * add superset word mark * Update rename note in docs * Fixing images * Pinning datatables * Fixing issues with mapbox-gl * Forgot to rename one file * Linting * v0.13.0 * adding pyyaml to dev-reqs
34 lines
794 B
Python
34 lines
794 B
Python
"""change_table_unique_constraint
|
|
|
|
Revision ID: b4456560d4f3
|
|
Revises: bb51420eaf83
|
|
Create Date: 2016-04-15 08:31:26.249591
|
|
|
|
"""
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'b4456560d4f3'
|
|
down_revision = 'bb51420eaf83'
|
|
|
|
from alembic import op
|
|
|
|
|
|
def upgrade():
|
|
try:
|
|
# Trying since sqlite doesn't like constraints
|
|
op.drop_constraint(
|
|
u'tables_table_name_key', 'tables', type_='unique')
|
|
op.create_unique_constraint(
|
|
u'_customer_location_uc', 'tables',
|
|
['database_id', 'schema', 'table_name'])
|
|
except Exception:
|
|
pass
|
|
|
|
|
|
def downgrade():
|
|
try:
|
|
# Trying since sqlite doesn't like constraints
|
|
op.drop_constraint(u'_customer_location_uc', 'tables', type_='unique')
|
|
except Exception:
|
|
pass
|