Skip to content

Commit

Permalink
Adding migration file
Browse files Browse the repository at this point in the history
  • Loading branch information
mistercrunch committed Dec 4, 2015
1 parent 2743b24 commit 66089a8
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions panoramix/migrations/versions/1a48a5411020_adding_slug_to_dash.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"""adding slug to dash
Revision ID: 1a48a5411020
Revises: 289ce07647b
Create Date: 2015-12-04 09:42:16.973264
"""

# revision identifiers, used by Alembic.
revision = '1a48a5411020'
down_revision = '289ce07647b'

from alembic import op
import sqlalchemy as sa

def upgrade():
op.add_column('dashboards', sa.Column('slug', sa.String(length=255), nullable=True))
op.create_unique_constraint(None, 'dashboards', ['slug'])


def downgrade():
op.drop_constraint(None, 'dashboards', type_='unique')
op.drop_column('dashboards', 'slug')

0 comments on commit 66089a8

Please sign in to comment.