Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions migrations/versions/43e8c59339af_.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""Changing field type of gender from `Text` to `Select`

Revision ID: 43e8c59337af
Revises: 43e8c59337ae
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 = '6f7b6fad3f54'
down_revision = '6f7b6fad3f53'


def upgrade():
op.execute("UPDATE custom_forms SET type = 'select' where field_identifier = 'gender';", execution_options=None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it more specific, only the form type 'attendee' is being refactored.

Copy link
Member Author

@kushthedude kushthedude Jun 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CosmicCoder96 @iamareebjamal How do I select the form_type to attendee, Will adding an and form = 'attendee' be suffice or there is some other way?




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