mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
25 lines
523 B
Python
25 lines
523 B
Python
"""favorites_unique_constraint
|
|
|
|
Revision ID: 71477dadd6ef
|
|
Revises: 0f740a081d20
|
|
Create Date: 2018-07-11 12:49:52.792123
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '71477dadd6ef'
|
|
down_revision = '0f740a081d20'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
op.create_unique_constraint('unique_favorite', 'favorites', ['object_type', 'object_id', 'user_id'])
|
|
|
|
|
|
def downgrade():
|
|
op.drop_constraint('unique_favorite', 'favorites', type_='unique')
|