def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('emailmessage', sa.Column('id', mysql.INTEGER(display_width=11), nullable=False), sa.Column('email_type', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.Column('message_recipient', mysql.VARCHAR(length=100), nullable=True), sa.Column('message_sender', mysql.VARCHAR(length=100), nullable=True), sa.Column('delivered', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.Column('date_delivered', mysql.DATETIME(), nullable=True), sa.Column('date_created', mysql.DATETIME(), nullable=True), sa.Column('message_subject', mysql.VARCHAR(length=255), nullable=True), sa.Column('notification_type_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.ForeignKeyConstraint(['notification_type_id'], [u'confignotificationtype.id'], name=u'emailmessage_ibfk_1'), sa.PrimaryKeyConstraint('id'), mysql_default_charset=u'latin1', mysql_engine=u'InnoDB')
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.add_column( 'rules', sa.Column('regex_confirm', sa.String(length=512), nullable=True)) op.add_column('rules', sa.Column('repair', sa.String(length=512), nullable=True)) op.add_column( 'rules', sa.Column('status', mysql.TINYINT(display_width=2), nullable=True)) op.add_column('tasks', sa.Column('file_count', sa.Integer(), nullable=True)) op.add_column('tasks', sa.Column('target', sa.String(length=255), nullable=True)) op.add_column('tasks', sa.Column('time_consume', sa.DateTime(), nullable=True)) op.add_column('tasks', sa.Column('time_end', sa.DateTime(), nullable=True)) op.add_column('tasks', sa.Column('time_start', sa.DateTime(), nullable=True)) op.alter_column('tasks', 'created_at', existing_type=mysql.DATETIME(), nullable=True) op.alter_column('tasks', 'scan_way', existing_type=mysql.SMALLINT(display_width=6), nullable=True) op.alter_column('tasks', 'updated_at', existing_type=mysql.DATETIME(), nullable=True) op.drop_column('tasks', 'url') op.drop_column('tasks', 'task_type') op.drop_column('tasks', 'filename') op.add_column('vuls', sa.Column('repair', sa.String(length=512), nullable=True))
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('calendar_festive', sa.Column('calendar_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.Column('festive_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.ForeignKeyConstraint(['calendar_id'], ['calendar.id'], name='calendar_festive_ibfk_1'), sa.ForeignKeyConstraint(['festive_id'], ['festive.id'], name='calendar_festive_ibfk_2'), sa.PrimaryKeyConstraint('calendar_id', 'festive_id'), mysql_default_charset='latin1', mysql_engine='InnoDB') op.create_table('calendar', sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False), sa.Column('descripcion', mysql.VARCHAR(length=15), nullable=False), sa.Column('dias', mysql.VARCHAR(length=15), nullable=False), sa.Column('hora_inicio', mysql.TIME(), nullable=True), sa.Column('hora_final', mysql.TIME(), nullable=True), sa.Column('fulltime', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.PrimaryKeyConstraint('id'), mysql_default_charset='latin1', mysql_engine='InnoDB')
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('comments', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('friend_link', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column( 'friend_link', 'logo', existing_type=mysql.MEDIUMTEXT(collation='utf8mb4_unicode_ci'), type_=sa.Text(length=65535), existing_nullable=True) op.alter_column('messages', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('post_type', 'default', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('posts', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('roles', 'default', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.create_index(op.f('ix_stat_event_ip'), 'stat_event', ['ip'], unique=False) op.create_index(op.f('ix_stat_event_visitor_id'), 'stat_event', ['visitor_id'], unique=False)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('user', 'admin', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('tv_series', 'tmdb_in_production', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('subtitle_track', 'forced', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('ref_quality', 'physical_media', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.drop_index(op.f('ix_movie_title'), table_name='movie') op.create_index('ix_movie_title', 'movie', ['title'], unique=True) op.alter_column('movie', 'tmdb_video', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('movie', 'tmdb_adult', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('file', 'fullscreen', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('tareas', sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False), sa.Column('label', mysql.VARCHAR(length=250), nullable=False), sa.Column('done', mysql.TINYINT(display_width=1), autoincrement=False, nullable=False), sa.Column('user_username', mysql.VARCHAR(length=50), nullable=True), sa.ForeignKeyConstraint(['user_username'], ['user.username'], name='tareas_ibfk_1'), sa.PrimaryKeyConstraint('id'), mysql_default_charset='latin1', mysql_engine='InnoDB') op.drop_table('tarea')
class Site(Base): __tablename__ = 'hamnet_site' id = Column(mysql.INTEGER(10, unsigned=True), nullable=False, autoincrement="auto", primary_key=True) name = Column(mysql.VARCHAR(100), nullable=False, key='name') callsign = Column(mysql.VARCHAR(100), nullable=False, key='callsign') longitude = Column(mysql.DOUBLE, nullable=False) latitude = Column(mysql.DOUBLE, nullable=False) elevation = Column(mysql.INTEGER(11), nullable=False) ground_asl = Column(mysql.INTEGER(11), nullable=False) no_check = Column(mysql.INTEGER(11), nullable=False) radioparam = Column(mysql.VARCHAR(200), nullable=False) inactive = Column(mysql.INTEGER(11), nullable=False) newCover = Column(mysql.TINYINT(1), nullable=False, default=0) hasCover = Column(mysql.INTEGER(1), nullable=False, default=0) comment = Column(mysql.TEXT, nullable=False) maintainer = Column(mysql.VARCHAR(200), nullable=False) rw_maint = Column(mysql.INTEGER(11), nullable=False) editor = Column(mysql.VARCHAR(100), nullable=False) edited = Column(mysql.DATETIME, nullable=False) version = Column(mysql.INTEGER(11), nullable=False) deleted = Column(mysql.INTEGER(11), nullable=False)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('users', sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False), sa.Column('email', mysql.VARCHAR(collation=u'utf8_bin', length=60), nullable=True), sa.Column('first_name', mysql.VARCHAR(collation=u'utf8_bin', length=60), nullable=True), sa.Column('last_name', mysql.VARCHAR(collation=u'utf8_bin', length=60), nullable=True), sa.Column('password_hash', mysql.VARCHAR(collation=u'utf8_bin', length=128), nullable=True), sa.Column('is_admin', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.PrimaryKeyConstraint('id'), mysql_collate=u'utf8_bin', mysql_default_charset=u'utf8', mysql_engine=u'InnoDB') op.create_index('ix_users_last_name', 'users', ['last_name'], unique=False) op.create_index('ix_users_first_name', 'users', ['first_name'], unique=False) op.create_index('ix_users_email', 'users', ['email'], unique=True) op.drop_index(op.f('ix_employees_last_name'), table_name='employees') op.drop_index(op.f('ix_employees_first_name'), table_name='employees') op.drop_index(op.f('ix_employees_email'), table_name='employees') op.drop_table('employees')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('roles', sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False), sa.Column('name', mysql.VARCHAR(length=64), nullable=True), sa.PrimaryKeyConstraint('id'), mysql_default_charset='utf8', mysql_engine='InnoDB' ) op.create_index('name', 'roles', ['name'], unique=True) op.create_table('users', sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False), sa.Column('name', mysql.VARCHAR(length=64), nullable=True), sa.Column('role_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.Column('email', mysql.VARCHAR(length=64), nullable=True), sa.Column('password_hash', mysql.VARCHAR(length=128), nullable=True), sa.Column('confirmed', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.ForeignKeyConstraint(['role_id'], ['roles.id'], name='users_ibfk_1'), sa.PrimaryKeyConstraint('id'), mysql_default_charset='utf8', mysql_engine='InnoDB' ) op.create_index('ix_users_name', 'users', ['name'], unique=True) op.create_index('ix_users_email', 'users', ['email'], unique=True)
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### # be sure to MODIFY this line to make nullable=True: op.add_column( 'users', sa.Column('fs_uniquifier', sa.String(length=64), nullable=True)) # update existing rows with unique fs_uniquifier import uuid user_table = sa.Table('users', sa.MetaData(), sa.Column('id', sa.Integer, primary_key=True), sa.Column('fs_uniquifier', sa.String)) conn = op.get_bind() for row in conn.execute(sa.select([user_table.c.id])): conn.execute( user_table.update().values(fs_uniquifier=uuid.uuid4().hex).where( user_table.c.id == row['id'])) # finally - set nullable to false op.alter_column('users', 'fs_uniquifier', existing_type=sa.String(length=64), nullable=False) op.alter_column('users', 'active', existing_type=mysql.TINYINT(display_width=1), nullable=False) op.alter_column('users', 'password', existing_type=mysql.VARCHAR(charset='utf8', collation='utf8_bin', length=255), nullable=False) op.create_unique_constraint(None, 'users', ['fs_uniquifier'])
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column( 'message', sa.Column('read', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True)) op.create_index('ix_message_read', 'message', ['read'], unique=False) op.drop_index(op.f('ix_message_sender_status'), table_name='message') op.alter_column('message', 'conversation_id', existing_type=mysql.INTEGER(display_width=11), nullable=True) op.drop_column('message', 'sender_status') op.create_table( 'user_message', sa.Column('user_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.Column('message_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.ForeignKeyConstraint(['message_id'], ['message.id'], name='fk_user_message_message_id_message'), sa.ForeignKeyConstraint(['user_id'], ['user.id'], name='fk_user_message_user_id_user'), mysql_collate='utf8_bin', mysql_default_charset='utf8', mysql_engine='InnoDB') op.drop_index(op.f('ix_recipient_data_status'), table_name='recipient_data') op.drop_index(op.f('ix_recipient_data_read'), table_name='recipient_data') op.drop_table('recipient_data')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('aws_message', sa.Column('id', mysql.BIGINT(display_width=20), autoincrement=True, nullable=False), sa.Column('created_at', mysql.DATETIME(), server_default=sa.text("'0000-00-00 00:00:00'"), nullable=False), sa.Column('update_at', mysql.DATETIME(), server_default=sa.text("'0000-00-00 00:00:00'"), nullable=False), sa.Column('deleted_at', mysql.DATETIME(), server_default=sa.text("'0000-00-00 00:00:00'"), nullable=False), sa.Column('deleted', mysql.TINYINT(display_width=1), server_default=sa.text("'0'"), autoincrement=False, nullable=False), sa.Column('send_message', mysql.VARCHAR(length=1024), server_default=sa.text("''"), nullable=False), sa.Column('response_message', mysql.VARCHAR(length=1024), server_default=sa.text("''"), nullable=False), sa.PrimaryKeyConstraint('id'), mysql_default_charset='utf8', mysql_engine='InnoDB') op.drop_table('sms_message')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('base_model', sa.Column('id', mysql.INTEGER(display_width=11), nullable=False), sa.Column('createTime', mysql.DATETIME(), nullable=True), sa.Column('updateTime', mysql.DATETIME(), nullable=True), sa.Column('isDelete', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.Column('userId', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.Column('projectId', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.Column('serverId', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True), sa.Column('message', mysql.VARCHAR(length=500), nullable=True), sa.Column('log', mysql.VARCHAR(length=500), nullable=True), sa.Column('address', mysql.VARCHAR(length=50), nullable=True), sa.PrimaryKeyConstraint('id'), mysql_default_charset='utf8', mysql_engine='InnoDB') op.drop_table('history') op.drop_table('addsvn')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_column('researcher', 'l_name') op.drop_column('researcher', 'job_title') op.drop_column('researcher', 'f_name') op.drop_column('researcher', 'email') op.drop_column('researcher', 'ORCID') op.create_table('research_centre_profile', sa.Column('research_centre', mysql.VARCHAR(length=128), nullable=True), sa.Column('research_centre_profile_ID', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.Column('online', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.Column('password_hash', mysql.VARCHAR(length=128), nullable=True), mysql_default_charset='utf8', mysql_engine='InnoDB')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('sellers', sa.Column('id', mysql.INTEGER(display_width=11), autoincrement=True, nullable=False), sa.Column('username', mysql.VARCHAR(length=60), nullable=True), sa.Column('first_name', mysql.VARCHAR(length=60), nullable=True), sa.Column('last_name', mysql.VARCHAR(length=60), nullable=True), sa.Column('password_hash', mysql.VARCHAR(length=128), nullable=True), sa.Column('is_admin', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.Column('created_on', mysql.DATETIME(), server_default=sa.text('current_timestamp()'), nullable=True), sa.Column('updated_on', mysql.DATETIME(), server_default=sa.text('current_timestamp()'), nullable=True), sa.CheckConstraint('`is_admin` in (0,1)', name='CONSTRAINT_1'), sa.PrimaryKeyConstraint('id'), mysql_default_charset='utf8', mysql_engine='InnoDB' ) op.create_index('ix_w3_db_Sellers_username', 'sellers', ['username'], unique=True) op.create_index('ix_w3_db_Sellers_last_name', 'sellers', ['last_name'], unique=False) op.create_index('ix_w3_db_Sellers_first_name', 'sellers', ['first_name'], unique=False) op.drop_index(op.f('ix_w3_db_Sellers_username'), table_name='Sellers', schema='w3_db') op.drop_index(op.f('ix_w3_db_Sellers_last_name'), table_name='Sellers', schema='w3_db') op.drop_index(op.f('ix_w3_db_Sellers_first_name'), table_name='Sellers', schema='w3_db') op.drop_index(op.f('ix_w3_db_Sellers_email'), table_name='Sellers', schema='w3_db') op.drop_table('Sellers', schema='w3_db')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column( 'reviews', sa.Column('peer_review_id', mysql.VARCHAR(length=36), nullable=True)) op.drop_constraint(None, 'reviews', type_='foreignkey') op.create_foreign_key('reviews_ibfk_1', 'reviews', 'items', ['item_id'], ['id']) op.add_column( 'review_questions', sa.Column('mandatory', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True)) op.drop_constraint(None, 'review_questions', type_='foreignkey') op.drop_column('review_questions', 'upper_bound') op.drop_column('review_questions', 'parent_question_id') op.drop_column('review_questions', 'max_children') op.drop_column('review_questions', 'lower_bound') op.drop_constraint(None, 'review_answers', type_='foreignkey') op.create_foreign_key('review_answers_ibfk_1', 'review_answers', 'reviews', ['review_id'], ['id']) op.drop_column('items', 'verification_process_version') op.drop_table('review_pairs')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('user', sa.Column('id', mysql.INTEGER(), autoincrement=True, nullable=False), sa.Column('email', mysql.VARCHAR(length=120), nullable=False), sa.Column('password', mysql.VARCHAR(length=80), nullable=False), sa.Column('is_active', mysql.TINYINT(display_width=1), autoincrement=False, nullable=False), sa.CheckConstraint('(`is_active` in (0,1))', name='user_chk_1'), sa.PrimaryKeyConstraint('id'), mysql_collate='utf8mb4_0900_ai_ci', mysql_default_charset='utf8mb4', mysql_engine='InnoDB') op.create_index('email', 'user', ['email'], unique=True)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('reviews_in_progress', sa.Column('id', mysql.VARCHAR(length=36), nullable=False), sa.Column('item_id', mysql.VARCHAR(length=36), nullable=True), sa.Column('user_id', mysql.VARCHAR(length=36), nullable=True), sa.Column('start_timestamp', mysql.DATETIME(), nullable=True), sa.Column('is_peer_review', mysql.TINYINT(display_width=1), autoincrement=False, nullable=True), sa.ForeignKeyConstraint(['item_id'], ['items.id'], name='reviews_in_progress_ibfk_1'), sa.ForeignKeyConstraint(['user_id'], ['users.id'], name='reviews_in_progress_ibfk_2'), sa.PrimaryKeyConstraint('id'), mysql_default_charset='utf8mb4', mysql_engine='InnoDB')
def upgrade(): op.add_column( 'etablissements_admin_update', sa.Column('romes_to_boost', mysql.TEXT(collation='utf8mb4_unicode_ci'), nullable=False)) op.add_column( 'etablissements_admin_update', sa.Column('boost', mysql.TINYINT(display_width=1), server_default=sa.text("'0'"), autoincrement=False, nullable=False)) conn = op.get_bind() for item in conn.execute("SELECT * FROM `etablissements_admin_update`;"): if item.new_score == 100: conn.execute( "UPDATE `etablissements_admin_update` SET `boost` = 1 WHERE id = %s;" % item.id) op.drop_column('etablissements_admin_update', 'new_score')
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.create_table('sponsorquerylog', sa.Column('id', sa.Integer(), nullable=False), sa.Column('time', sa.String(length=19), nullable=True), sa.Column('organization', sa.String(length=100), nullable=True), sa.Column('name', sa.String(length=256), nullable=True), sa.Column('phone', sa.String(length=13), nullable=True), sa.Column('city', sa.String(length=64), nullable=True), sa.Column('state', sa.String(length=32), nullable=True), sa.Column('street', sa.String(length=128), nullable=True), sa.Column('zipcode', sa.String(length=10), nullable=True), sa.Column('email', sa.String(length=100), nullable=True), sa.Column('race', sa.String(length=256), nullable=True), sa.Column('amount', sa.Integer(), nullable=True), sa.Column('level', sa.String(length=50), nullable=True), sa.Column('comments', sa.String(length=1024), nullable=True), sa.PrimaryKeyConstraint('id') ) op.alter_column('course', 'isStandard', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('event', 'isOnCalendar', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('service', 'isCalendarBlocked', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('sponsorlevel', 'display', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('tag', 'isBuiltIn', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('user', 'active', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True)
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.alter_column('tallySheetVersion', 'isComplete', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.alter_column('proof', 'finished', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('invoice_stationaryItem', 'received', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.alter_column('invoice', 'delete', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('invoice', 'confirmed', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.alter_column('election_candidate', 'qualifiedForPreferences', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.create_table('tallySheetVersion_PRE_34_summary', sa.Column('tallySheetVersionRowId', mysql.INTEGER(display_width=11), nullable=False), sa.Column('tallySheetVersionId', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.Column('electionId', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.Column('ballotPapersNotCounted', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.Column('remainingBallotPapers', mysql.INTEGER(display_width=11), autoincrement=False, nullable=False), sa.ForeignKeyConstraint(['electionId'], ['election.electionId'], name='tallySheetVersion_PRE_34_summary_ibfk_1'), sa.ForeignKeyConstraint(['tallySheetVersionId'], ['tallySheetVersion.tallySheetVersionId'], name='tallySheetVersion_PRE_34_summary_ibfk_2'), sa.PrimaryKeyConstraint('tallySheetVersionRowId'), mysql_collate='utf8mb4_unicode_ci', mysql_default_charset='utf8mb4', mysql_engine='InnoDB' ) op.drop_table('tallySheetVersionRow_PRE_34_summary')
def downgrade(): ### commands auto generated by Alembic - please adjust! ### op.alter_column('tallySheetVersion', 'isComplete', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.drop_constraint(None, 'submission', type_='foreignkey') op.drop_constraint(None, 'submission', type_='foreignkey') op.drop_constraint(None, 'submission', type_='foreignkey') op.drop_constraint(None, 'submission', type_='foreignkey') op.drop_column('submission', 'releasedVersionId') op.drop_column('submission', 'releasedStampId') op.drop_column('submission', 'notifiedVersionId') op.drop_column('submission', 'notifiedStampId') op.alter_column('proof', 'finished', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('invoice_stationaryItem', 'received', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.alter_column('invoice', 'delete', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('invoice', 'confirmed', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False) op.alter_column('election_candidate', 'qualifiedForPreferences', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=False)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('user', 'active', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('tag', 'isBuiltIn', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.drop_column('sponsorrace', 'rdphone') op.drop_column('sponsorrace', 'rdemail') op.drop_column('sponsorrace', 'isRDCertified') op.drop_column('sponsorrace', 'couponproviderid') op.alter_column('sponsorlevel', 'display', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.drop_column('sponsorbenefit', 'order') op.alter_column('service', 'isCalendarBlocked', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('event', 'isOnCalendar', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('course', 'isStandard', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.drop_column('client', 'contactTitle') op.drop_table('sponsor') op.drop_table('sponsorracedate')
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('roles', 'default', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('posts', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('post_type', 'default', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('messages', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('friend_link', 'logo', existing_type=sa.Text(length=65535), type_=mysql.MEDIUMTEXT(collation='utf8mb4_unicode_ci'), existing_nullable=True) op.alter_column('friend_link', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('comments', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.drop_table('stat_event')
def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('tallySheetVersionRow_PRE_34_summary', sa.Column('tallySheetVersionRowId', sa.Integer(), nullable=False), sa.Column('tallySheetVersionId', sa.Integer(), nullable=False), sa.Column('electionId', sa.Integer(), nullable=False), sa.Column('ballotPapersNotCounted', sa.Integer(), nullable=False), sa.Column('remainingBallotPapers', sa.Integer(), nullable=False), sa.ForeignKeyConstraint(['electionId'], ['election.electionId'], ), sa.ForeignKeyConstraint(['tallySheetVersionId'], ['tallySheetVersion.tallySheetVersionId'], ), sa.PrimaryKeyConstraint('tallySheetVersionRowId'), sa.UniqueConstraint('tallySheetVersionId', 'electionId', name='TallySheetVersion_PRE_34_summary_Model') ) op.drop_table('tallySheetVersion_PRE_34_summary') op.alter_column('election_candidate', 'qualifiedForPreferences', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=False) op.alter_column('invoice', 'confirmed', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=False) op.alter_column('invoice', 'delete', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('invoice_stationaryItem', 'received', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=False) op.alter_column('proof', 'finished', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('tallySheetVersion', 'isComplete', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=False)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('vendors', 'visible_for_search', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=4), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('vendors', 'visible', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=4), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('users', 'is_vendor_manager', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=4), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('users', 'is_analyst', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=4), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('users', 'is_admin', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=4), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('firmware', 'inhibit_download', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=4), existing_nullable=True, existing_server_default=sa.text(u'0'))
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('roles', 'default', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('posts', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('post_type', 'default', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('messages', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('friend_link', 'logo', existing_type=sa.LargeBinary(length=65535), type_=mysql.VARCHAR(length=64), existing_nullable=True) op.alter_column('friend_link', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('comments', 'hide', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True)
def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('comments', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('friend_link', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('friend_link', 'logo', existing_type=mysql.MEDIUMTEXT(), type_=sa.Text(length=65535), existing_nullable=True) op.alter_column('messages', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('post_type', 'default', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('posts', 'hide', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True) op.alter_column('roles', 'default', existing_type=mysql.TINYINT(display_width=1), type_=sa.Boolean(), existing_nullable=True)
def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.alter_column('teams', 'verified', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('teams', 'banned', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('teams', 'admin', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('pages', 'draft', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('pages', 'auth_required', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True) op.alter_column('challenges', 'stage', existing_type=sa.Integer(), type_=mysql.TEXT(), existing_nullable=True) op.alter_column('challenges', 'hidden', existing_type=sa.Boolean(), type_=mysql.TINYINT(display_width=1), existing_nullable=True)
def upgrade(): op.alter_column('firmware', 'inhibit_download', existing_type=mysql.TINYINT(display_width=4), type_=sa.Boolean(), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('users', 'is_admin', existing_type=mysql.TINYINT(display_width=4), type_=sa.Boolean(), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('users', 'is_analyst', existing_type=mysql.TINYINT(display_width=4), type_=sa.Boolean(), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('users', 'is_vendor_manager', existing_type=mysql.TINYINT(display_width=4), type_=sa.Boolean(), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('vendors', 'visible', existing_type=mysql.TINYINT(display_width=4), type_=sa.Boolean(), existing_nullable=True, existing_server_default=sa.text(u'0')) op.alter_column('vendors', 'visible_for_search', existing_type=mysql.TINYINT(display_width=4), type_=sa.Boolean(), existing_nullable=True, existing_server_default=sa.text(u'0'))