Skip to content

Commit

Permalink
fix: Migration for changing gender type (fossasia#6117)
Browse files Browse the repository at this point in the history
  • Loading branch information
kushthedude authored and iamareebjamal committed Aug 2, 2019
1 parent 68d8dfc commit 05b9e17
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions migrations/versions/43e8c59339af_.py
@@ -0,0 +1,25 @@
"""Changing field type of gender from `Text` to `Select`
Revision ID: 43e8c59337af
Revises: b2aca7268345
Create Date: 2019-06-27 20:31:58.92665
"""

from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils


# revision identifiers, used by Alembic.
revision = '43e8c59337af'
down_revision = 'b2aca7268345'


def upgrade():
op.execute("UPDATE custom_forms SET type = 'select' where field_identifier = 'gender' and form = 'attendee';", execution_options=None)



def downgrade():
op.execute("UPDATE custom_forms SET type = 'text' where field_identifier = 'gender' and form = 'attendee';", execution_options=None)

0 comments on commit 05b9e17

Please sign in to comment.