Python sqlalchemy.VARCHAR Examples

The following are 30 code examples of sqlalchemy.VARCHAR(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module sqlalchemy , or try the search function .
Example #1
Source File: 551c4e6d4a8b_.py    From app with MIT License 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('client_scope',
    sa.Column('client_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.Column('scope_id', sa.INTEGER(), autoincrement=False, nullable=False),
    sa.ForeignKeyConstraint(['client_id'], ['client.id'], name='client_scope_client_id_fkey', ondelete='CASCADE'),
    sa.ForeignKeyConstraint(['scope_id'], ['scope.id'], name='client_scope_scope_id_fkey', ondelete='CASCADE'),
    sa.PrimaryKeyConstraint('client_id', 'scope_id', name='client_scope_pkey')
    )
    op.create_table('scope',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('created_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
    sa.Column('updated_at', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('name', sa.VARCHAR(length=128), autoincrement=False, nullable=False),
    sa.PrimaryKeyConstraint('id', name='scope_pkey'),
    sa.UniqueConstraint('name', name='scope_name_key')
    )
    # ### end Alembic commands ### 
Example #2
Source File: 1c89fa61f23e_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('targeting_survey_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key('user_targeting_survey_id_fkey', 'user', 'targeting_survey', ['targeting_survey_id'], ['id'])
    op.create_table('targeting_survey',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('number_people_household', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('number_below_adult_age_household', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('number_people_women_household', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('number_people_men_household', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('number_people_work_household', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('disabilities_household', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('long_term_illnesses_household', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('authorising_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='targeting_survey_pkey')
    )
    # ### end Alembic commands ### 
Example #3
Source File: 24f943b464ae_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('_public_serial_number', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('user', 'public_serial_number')
    op.add_column('uploaded_document', sa.Column('business_verification_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'uploaded_document', type_='foreignkey')
    op.create_foreign_key('uploaded_document_business_verification_id_fkey', 'uploaded_document', 'kyc_application', ['business_verification_id'], ['id'])
    op.drop_column('uploaded_document', 'kyc_application_id')
    op.add_column('transfer_card', sa.Column('amount_loaded_signature', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_card', sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('transfer_card', sa.Column('_amount_loaded', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key('transfer_card_user_id_fkey', 'transfer_card', 'user', ['user_id'], ['id'])
    op.drop_column('kyc_application', 'type')
    op.add_column('credit_transfer', sa.Column('uuid', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('blockchain_transaction', sa.Column('is_bitcoin', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('blockchain_transaction', sa.Column('has_output_txn', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('bank_account', sa.Column('business_verification_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'bank_account', type_='foreignkey')
    op.create_foreign_key('bank_account_business_verification_id_fkey', 'bank_account', 'kyc_application', ['business_verification_id'], ['id'])
    op.drop_column('bank_account', 'wyre_id')
    op.drop_column('bank_account', 'kyc_application_id')
    # ### end Alembic commands ### 
Example #4
Source File: 7583891c4ae5_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('is_superadmin', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('is_admin', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'user', type_='foreignkey')
    op.drop_column('user', 'secret')
    op.drop_column('user', 'public_serial_number')
    op.drop_column('user', 'nfc_serial_number')
    op.drop_column('user', 'chatbot_state_id')
    op.drop_column('user', '_is_superadmin')
    op.drop_column('user', '_is_subadmin')
    op.drop_column('user', '_is_admin')
    op.create_table('pin_to_public_id',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('public_id', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('PIN', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='pin_to_public_id_pkey')
    )
    op.drop_table('public_serial_number')
    op.drop_table('chatbot_state')
    # ### end Alembic commands ### 
Example #5
Source File: 875c52a485_.py    From comport with BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def downgrade():
    ### commands auto generated by Alembic - please adjust! ###
    op.create_table('months',
    sa.Column('id', sa.INTEGER(), server_default=sa.text("nextval('months_id_seq'::regclass)"), nullable=False),
    sa.Column('month', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('year', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('department_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['department_id'], ['departments.id'], name='months_department_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='months_pkey'),
    postgresql_ignore_search_path=False
    )
    op.create_table('serviceTypes',
    sa.Column('id', sa.INTEGER(), server_default=sa.text('nextval(\'"serviceTypes_id_seq"\'::regclass)'), nullable=False),
    sa.Column('month_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('service_type', sa.VARCHAR(length=36), autoincrement=False, nullable=False),
    sa.Column('count', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['month_id'], ['months.id'], name='serviceTypes_month_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='serviceTypes_pkey')
    )
    op.drop_table('use_of_force_incidents')
    ### end Alembic commands ### 
Example #6
Source File: 87b723e167d3_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    conn = op.get_bind()
    session = Session(bind=conn)

    f = Fernet(current_app.config['PASSWORD_PEPPER'])

    for user in session.query(User).execution_options(show_all=True).all():
        if user.password_hash:
            user.password_hash = f.decrypt(user.password_hash.encode()).decode()
        if user.pin_hash:
            user.pin_hash = f.decrypt(user.pin_hash.encode()).decode()
    session.commit()

    op.alter_column('user', 'password_hash',
           existing_type=sa.VARCHAR(length=200),
           type_=sa.VARCHAR(length=128),
           existing_nullable=False)
    op.alter_column('user', 'pin_hash',
           existing_type=sa.VARCHAR(length=200),
           type_=sa.VARCHAR(),
           existing_nullable=False)
    session.commit() 
Example #7
Source File: 87b723e167d3_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def upgrade():
    conn = op.get_bind()
    session = Session(bind=conn)

    op.alter_column('user', 'password_hash',
           existing_type=sa.VARCHAR(length=128),
           type_=sa.VARCHAR(length=200),
           existing_nullable=False)
    op.alter_column('user', 'pin_hash',
           existing_type=sa.VARCHAR(),
           type_=sa.VARCHAR(length=200),
           existing_nullable=False)
    session.commit()

    f = Fernet(current_app.config['PASSWORD_PEPPER'])
    for user in session.query(User).execution_options(show_all=True).all():
        if user.password_hash:
            user.password_hash = f.encrypt(user.password_hash.encode()).decode()
        if user.pin_hash:
            user.pin_hash = f.encrypt(user.pin_hash.encode()).decode()
    session.commit() 
Example #8
Source File: 2020_022722_75093e7ded27_.py    From app with MIT License 6 votes vote down vote up
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('social_auth',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
    sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
    sa.Column('user_id', sa.Integer(), nullable=False),
    sa.Column('social', sa.String(length=128), nullable=False),
    sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
    sa.PrimaryKeyConstraint('id'),
    sa.UniqueConstraint('user_id', 'social', name='uq_social_auth')
    )
    op.alter_column('users', 'password',
               existing_type=sa.VARCHAR(length=128),
               nullable=True)
    op.alter_column('users', 'salt',
               existing_type=sa.VARCHAR(length=128),
               nullable=True)
    # ### end Alembic commands ### 
Example #9
Source File: 026e6bde589e_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('blockchain_transaction',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('submitted_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('added_date', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('hash', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('credit_transfer_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('authorising_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('block', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('status', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('transaction_type', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('message', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('signing_blockchain_address_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('nonce', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('has_output_txn', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('is_bitcoin', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['credit_transfer_id'], ['credit_transfer.id'], name='blockchain_transaction_credit_transfer_id_fkey'),
    sa.ForeignKeyConstraint(['signing_blockchain_address_id'], ['blockchain_address.id'], name='blockchain_transaction_signing_blockchain_address_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='blockchain_transaction_pkey')
    )
    # ### end Alembic commands ### 
Example #10
Source File: 778e1348250b_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('chatbot_state_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.create_foreign_key('user_chatbot_state_id_fkey', 'user', 'chatbot_state', ['chatbot_state_id'], ['id'])
    op.create_table('chatbot_state',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('transfer_initialised', sa.BOOLEAN(), autoincrement=False, nullable=True),
    sa.Column('transfer_amount', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('prev_pin_failures', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('last_accessed', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('authorising_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('provider_message_id', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('target_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='chatbot_state_pkey')
    )
    # ### end Alembic commands ### 
Example #11
Source File: ba9c2a8e7338_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('referral',
    sa.Column('id', sa.INTEGER(), autoincrement=True, nullable=False),
    sa.Column('authorising_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('first_name', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('last_name', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('reason', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('_phone', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('referring_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.ForeignKeyConstraint(['referring_user_id'], ['user.id'], name='referral_referring_user_id_fkey'),
    sa.PrimaryKeyConstraint('id', name='referral_pkey')
    )
    # ### end Alembic commands ### 
Example #12
Source File: 3c523b7fe87d_.py    From SempoBlockchain with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('transfer_account', sa.Column('chat_transfer_amount', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('chat_prev_pin_failures', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('secret', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('chat_last_accessed', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('pin', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('chat_target_account_id', sa.INTEGER(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('nfc_card_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('facebook_psid', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('chat_source_preference', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('qr_code', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('_phone', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('chat_transfer_initialised', sa.BOOLEAN(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'transfer_account', type_='foreignkey')
    op.drop_column('transfer_account', 'vendor_id')
    op.drop_table('vendor')
    # ### end Alembic commands ### 
Example #13
Source File: d4841aeeb072_.py    From gitlab-tools with GNU General Public License v3.0 6 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('task_result', sa.Column('traceback', sa.TEXT(), autoincrement=False, nullable=True))
    op.add_column('task_result', sa.Column('task_id', sa.VARCHAR(length=155), autoincrement=False, nullable=True))
    op.add_column('task_result', sa.Column('date_done', postgresql.TIMESTAMP(), autoincrement=False, nullable=True))
    op.add_column('task_result', sa.Column('status', sa.VARCHAR(length=50), autoincrement=False, nullable=True))
    op.add_column('task_result', sa.Column('result', postgresql.BYTEA(), autoincrement=False, nullable=True))
    op.drop_constraint(None, 'task_result', type_='foreignkey')
    op.create_unique_constraint('task_result_task_id_key', 'task_result', ['task_id'])
    op.drop_index(op.f('ix_task_result_celery_taskmeta_id'), table_name='task_result')
    op.drop_column('task_result', 'celery_taskmeta_id')
    op.drop_table('celery_tasksetmeta')
    op.drop_table('celery_taskmeta')
    # ### end Alembic commands ### 
Example #14
Source File: c13b0a18676d_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('blockchain_transaction', sa.Column('coinbase', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('blockchain_transaction', sa.Column('contract_address', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('blockchain_transaction', 'ignore')
    # ### end Alembic commands ### 
Example #15
Source File: 21a880175a91_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('token', 'address',
               existing_type=sa.VARCHAR(),
               nullable=False)
    # ### end Alembic commands ### 
Example #16
Source File: 9dd5ac2ea072_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('user', 'is_deactiviated')
    op.add_column('email_whitelist', sa.Column('item', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('email_whitelist', 'email')
    # ### end Alembic commands ### 
Example #17
Source File: 5e14a51b6865_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('ap_paypal_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('ap_bank_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('ap_user_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('kyc_state', sa.VARCHAR(), autoincrement=False, nullable=True))
    # ### end Alembic commands ### 
Example #18
Source File: 5ac46b68b339_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('public_serial_number',
    sa.Column('id', sa.INTEGER(), nullable=False),
    sa.Column('public_serial_number', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('PIN', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('nfc_serial_number', sa.VARCHAR(), autoincrement=False, nullable=True),
    sa.Column('authorising_user_id', sa.INTEGER(), autoincrement=False, nullable=True),
    sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=True),
    sa.PrimaryKeyConstraint('id', name='public_serial_number_pkey')
    )
    op.drop_table('transfer_card')
    # ### end Alembic commands ### 
Example #19
Source File: d785f1fb2307_.py    From spkrepo with MIT License 5 votes vote down vote up
def upgrade():
    op.alter_column(
        "screenshot",
        "path",
        existing_type=sa.VARCHAR(length=100),
        type_=sa.Unicode(length=200),
        existing_nullable=False,
    )
    op.add_column(
        "version", sa.Column("conf_privilege", sa.Unicode(length=255), nullable=True)
    )
    op.add_column(
        "version", sa.Column("conf_resource", sa.Unicode(length=255), nullable=True)
    ) 
Example #20
Source File: 0b4247c52ad5_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('blockchain_transaction', sa.Column('coinbase', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('blockchain_transaction', 'first_block_hash')
    # ### end Alembic commands ### 
Example #21
Source File: 9e96b52b50d8_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('blockchain_task', 'gasLimit')
    op.alter_column('blockchain_address', 'address',
               existing_type=sa.VARCHAR(),
               nullable=False)
    # ### end Alembic commands ### 
Example #22
Source File: 0fb2f2fc39d8_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('ap_bank_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('kyc_state', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('ap_user_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('user', sa.Column('ap_paypal_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('kyc_application', 'dob')
    # ### end Alembic commands ### 
Example #23
Source File: 21a880175a91_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column('token', 'address',
               existing_type=sa.VARCHAR(),
               nullable=True)
    # ### end Alembic commands ### 
Example #24
Source File: 7da32d18103f_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('phone', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('user', '_phone')
    op.add_column('transfer_account', sa.Column('phone', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.add_column('transfer_account', sa.Column('location', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('transfer_account', '_phone')
    op.drop_column('transfer_account', '_location')
    # ### end Alembic commands ### 
Example #25
Source File: 5c76f2801635_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('chatbot_state', sa.Column('source_preference', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_table('uploaded_image')
    # ### end Alembic commands ### 
Example #26
Source File: fee617363e27_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('credit_transfer', sa.Column('uuid', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('credit_transfer', 'old_uuid')
    # ### end Alembic commands ### 
Example #27
Source File: f1a06bc34d57_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('foo', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.drop_column('user', 'kyc_state')
    op.drop_column('user', 'ap_user_id')
    op.drop_column('user', 'ap_paypal_id')
    op.drop_column('user', 'ap_bank_id')
    # ### end Alembic commands ### 
Example #28
Source File: a444c06ff950_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_index(op.f('ix_transfer_card_public_serial_number'), table_name='transfer_card')
    op.alter_column('transfer_card', 'public_serial_number',
               existing_type=sa.VARCHAR(),
               nullable=True)
    # ### end Alembic commands ### 
Example #29
Source File: 5b13c102b559_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('user', sa.Column('public_transfer_account_id', sa.VARCHAR(), autoincrement=False, nullable=True))
    op.create_foreign_key('user_public_transfer_account_id_fkey', 'user', 'transfer_account', ['public_transfer_account_id'], ['qr_code'])
    # ### end Alembic commands ### 
Example #30
Source File: 3d146d7e19c4_.py    From SempoBlockchain with GNU General Public License v3.0 5 votes vote down vote up
def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('transfer_account', sa.Column('payable_epoch', sa.VARCHAR(), autoincrement=False, nullable=True))
    # ### end Alembic commands ###