Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def downgrade():
op.drop_column('updates', 'date_testing')
op.drop_column('updates', 'date_stable')
emote_stat.count = emote.count
emote_stat.tm_record = emote.tm_record
emote_stat.tm_record_date = datetime.datetime.now
for code in emote_stat_data:
emote_stat = EmoteStats()
emote_stat.emote_code = code
emote_stat.count = emote_stat_data[code]["count"]
emote_stat.tm_record = emote_stat_data[code]["tm_record"]
emote_stat.tm_record_date = datetime.datetime.now()
session.add(emote_stat)
session.commit()
op.drop_column("tb_emote", "tm_record")
op.drop_column("tb_emote", "count")
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("odkform", "form_yesno")
# ### end Alembic commands ###
def downgrade():
op.drop_column('task', 'action')
op.rename_table('task', 'deployment')
op.create_table(
'task',
sa.Column('id', sa.String(length=36), nullable=False))
helpers.transform_table(
'status', {'task_id': 'deployment_id'}, {},
sa.Column('created', sa.DateTime(), nullable=False),
sa.Column('updated', sa.DateTime(), nullable=False),
sa.Column('id', sa.String(length=36), nullable=False),
sa.Column('entity_id', sa.String(length=255), nullable=True),
sa.Column('entity', sa.String(length=10), nullable=True),
sa.Column('deployment_id', sa.String(length=36), nullable=True),
sa.Column('text', sa.Text(), nullable=False),
sa.Column('level', sa.String(length=32), nullable=False),
def downgrade():
op.drop_constraint('ck_events_venue_id_if_room_id', 'events', schema='events')
op.drop_constraint('ck_events_no_venue_name_if_venue_id', 'events', schema='events')
op.drop_constraint('ck_events_no_custom_location_if_room', 'events', schema='events')
op.drop_column('events', 'room_name', schema='events')
op.drop_column('events', 'room_id', schema='events')
op.drop_column('events', 'venue_name', schema='events')
op.drop_column('events', 'venue_id', schema='events')
op.drop_column('events', 'address', schema='events')
op.drop_constraint('uq_rooms_id_location_id', 'rooms', schema='roombooking')
def downgrade():
op.drop_column('nu_release_item', 'release_date')
### end Alembic commands ###
def downgrade():
op.drop_constraint("FK_ECOSYSTEM_FOR_PROJECT", "projects", type_="foreignkey")
op.drop_constraint("UNIQ_PROJECT_NAME_PER_ECOSYSTEM", "projects", type_="unique")
op.drop_column("projects", "ecosystem_name")
)
op.create_index(
"participant_summary_core_ordered_time",
"participant_summary",
["enrollment_status_core_ordered_sample_time"],
unique=False,
)
op.create_index("participant_sign_up_time", "participant", ["sign_up_time"], unique=False)
op.drop_index("participant_withdrawl_sign_up_hpo", table_name="participant")
op.add_column("metrics_race_cache", sa.Column("race_name", mysql.VARCHAR(length=255), nullable=False))
op.add_column(
"metrics_race_cache",
sa.Column("race_count", mysql.INTEGER(display_width=11), autoincrement=False, nullable=False),
)
op.drop_column("metrics_race_cache", "white")
op.drop_column("metrics_race_cache", "prefer_not_to_answer")
op.drop_column("metrics_race_cache", "none_of_these_fully_describe_me")
op.drop_column("metrics_race_cache", "no_ancestry_checked")
op.drop_column("metrics_race_cache", "native_hawaiian_other_pacific_islander")
op.drop_column("metrics_race_cache", "multi_ancestry")
op.drop_column("metrics_race_cache", "middle_eastern_north_african")
op.drop_column("metrics_race_cache", "hispanic_latino_spanish")
op.drop_column("metrics_race_cache", "black_african_american")
op.drop_column("metrics_race_cache", "asian")
op.drop_column("metrics_race_cache", "american_indian_alaska_native")
op.drop_index("calendar_idx", table_name="calendar")
# ### end Alembic commands ###
def _remove_node_id_columns():
op.drop_constraint(u'db_nodes_node_id_key', 'db_nodes', type_='unique')
op.drop_column('db_nodes', 'node_id')
op.drop_constraint(u'managers_node_id_key', 'managers', type_='unique')
op.drop_column('managers', 'node_id')
op.drop_constraint(
u'rabbitmq_brokers_node_id_key',
'rabbitmq_brokers',
type_='unique')
op.drop_column('rabbitmq_brokers', 'node_id')
def downgrade():
op.drop_constraint('ck_events_valid_visibility', 'events', schema='events')
op.drop_column('events', 'visibility', schema='events')