Skip to content

Commit

Permalink
db migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
jaesivsm committed Apr 17, 2016
1 parent d0bbafd commit 5abfc3a
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/migrations/versions/9e3fecc9d031_oauth_linuxfr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""empty message
Revision ID: 9e3fecc9d031
Revises: 122ac0c356c
Create Date: 2016-04-17 22:36:18.734849
"""

# revision identifiers, used by Alembic.
revision = '9e3fecc9d031'
down_revision = '122ac0c356c'
branch_labels = None
depends_on = None

import conf
from alembic import op
import sqlalchemy as sa


def upgrade():
op.add_column('user',
sa.Column('linuxfr_identity', sa.String(), nullable=True))


def downgrade():
if 'sqlite' not in conf.SQLALCHEMY_DATABASE_URI:
op.drop_column('user', 'linuxfr_identity')

0 comments on commit 5abfc3a

Please sign in to comment.