"""

Revision ID: 80b95a84e8cf
Revises: 41824183e8e3
Create Date: 2021-03-18 12:31:14.863245

"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils


from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums import WithdrawalStatus, WithdrawalReason, SuspensionStatus, QuestionnaireDefinitionStatus
from rdr_service.participant_enums import EnrollmentStatus, Race, SampleStatus, OrganizationType, BiobankOrderStatus
from rdr_service.participant_enums import OrderShipmentTrackingStatus, OrderShipmentStatus
from rdr_service.participant_enums import MetricSetType, MetricsKey, GenderIdentity
from rdr_service.model.base import add_table_history_table, drop_table_history_table
from rdr_service.model.code import CodeType
from rdr_service.model.site_enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus

# revision identifiers, used by Alembic.
revision = '80b95a84e8cf'
down_revision = '41824183e8e3'
branch_labels = None
depends_on = None


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()



def upgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('participant_summary_email', 'participant_summary', ['email'], unique=False)
    op.create_index('participant_summary_login_phone_number', 'participant_summary', ['login_phone_number'], unique=False)
    # ### end Alembic commands ###


def downgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('participant_summary_login_phone_number', table_name='participant_summary')
    op.drop_index('participant_summary_email', table_name='participant_summary')
    # ### end Alembic commands ###


def upgrade_metrics():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_metrics():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###

4536c3d79bca6f9322fb64f0964f747e379a040e
<mask token>


def upgrade(engine_name):
    globals()['upgrade_%s' % engine_name]()


<mask token>


def upgrade_rdr():
    op.create_index('participant_summary_email', 'participant_summary', [
        'email'], unique=False)
    op.create_index('participant_summary_login_phone_number',
        'participant_summary', ['login_phone_number'], unique=False)


def downgrade_rdr():
    op.drop_index('participant_summary_login_phone_number', table_name=
        'participant_summary')
    op.drop_index('participant_summary_email', table_name='participant_summary'
        )


def upgrade_metrics():
    pass


def downgrade_metrics():
    pass

<mask token>


def upgrade(engine_name):
    globals()['upgrade_%s' % engine_name]()


def downgrade(engine_name):
    globals()['downgrade_%s' % engine_name]()


def upgrade_rdr():
    op.create_index('participant_summary_email', 'participant_summary', [
        'email'], unique=False)
    op.create_index('participant_summary_login_phone_number',
        'participant_summary', ['login_phone_number'], unique=False)


def downgrade_rdr():
    op.drop_index('participant_summary_login_phone_number', table_name=
        'participant_summary')
    op.drop_index('participant_summary_email', table_name='participant_summary'
        )


def upgrade_metrics():
    pass


def downgrade_metrics():
    pass

<mask token>
revision = '80b95a84e8cf'
down_revision = '41824183e8e3'
branch_labels = None
depends_on = None


def upgrade(engine_name):
    globals()['upgrade_%s' % engine_name]()


def downgrade(engine_name):
    globals()['downgrade_%s' % engine_name]()


def upgrade_rdr():
    op.create_index('participant_summary_email', 'participant_summary', [
        'email'], unique=False)
    op.create_index('participant_summary_login_phone_number',
        'participant_summary', ['login_phone_number'], unique=False)


def downgrade_rdr():
    op.drop_index('participant_summary_login_phone_number', table_name=
        'participant_summary')
    op.drop_index('participant_summary_email', table_name='participant_summary'
        )


def upgrade_metrics():
    pass


def downgrade_metrics():
    pass

<mask token>
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums import WithdrawalStatus, WithdrawalReason, SuspensionStatus, QuestionnaireDefinitionStatus
from rdr_service.participant_enums import EnrollmentStatus, Race, SampleStatus, OrganizationType, BiobankOrderStatus
from rdr_service.participant_enums import OrderShipmentTrackingStatus, OrderShipmentStatus
from rdr_service.participant_enums import MetricSetType, MetricsKey, GenderIdentity
from rdr_service.model.base import add_table_history_table, drop_table_history_table
from rdr_service.model.code import CodeType
from rdr_service.model.site_enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus
revision = '80b95a84e8cf'
down_revision = '41824183e8e3'
branch_labels = None
depends_on = None


def upgrade(engine_name):
    globals()['upgrade_%s' % engine_name]()


def downgrade(engine_name):
    globals()['downgrade_%s' % engine_name]()


def upgrade_rdr():
    op.create_index('participant_summary_email', 'participant_summary', [
        'email'], unique=False)
    op.create_index('participant_summary_login_phone_number',
        'participant_summary', ['login_phone_number'], unique=False)


def downgrade_rdr():
    op.drop_index('participant_summary_login_phone_number', table_name=
        'participant_summary')
    op.drop_index('participant_summary_email', table_name='participant_summary'
        )


def upgrade_metrics():
    pass


def downgrade_metrics():
    pass

"""

Revision ID: 80b95a84e8cf
Revises: 41824183e8e3
Create Date: 2021-03-18 12:31:14.863245

"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils


from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus
from rdr_service.participant_enums import WithdrawalStatus, WithdrawalReason, SuspensionStatus, QuestionnaireDefinitionStatus
from rdr_service.participant_enums import EnrollmentStatus, Race, SampleStatus, OrganizationType, BiobankOrderStatus
from rdr_service.participant_enums import OrderShipmentTrackingStatus, OrderShipmentStatus
from rdr_service.participant_enums import MetricSetType, MetricsKey, GenderIdentity
from rdr_service.model.base import add_table_history_table, drop_table_history_table
from rdr_service.model.code import CodeType
from rdr_service.model.site_enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus

# revision identifiers, used by Alembic.
revision = '80b95a84e8cf'
down_revision = '41824183e8e3'
branch_labels = None
depends_on = None


def upgrade(engine_name):
    globals()["upgrade_%s" % engine_name]()


def downgrade(engine_name):
    globals()["downgrade_%s" % engine_name]()



def upgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_index('participant_summary_email', 'participant_summary', ['email'], unique=False)
    op.create_index('participant_summary_login_phone_number', 'participant_summary', ['login_phone_number'], unique=False)
    # ### end Alembic commands ###


def downgrade_rdr():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index('participant_summary_login_phone_number', table_name='participant_summary')
    op.drop_index('participant_summary_email', table_name='participant_summary')
    # ### end Alembic commands ###


def upgrade_metrics():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###


def downgrade_metrics():
    # ### commands auto generated by Alembic - please adjust! ###
    pass
    # ### end Alembic commands ###
