def fix_missing_deleted_at(meta, table_names):
    now = datetime.datetime.utcnow()
    for t in table_names:
        a_table_t = Table(t, meta, autoload=True)
        log.info('- action: fixing columns with missing deleted_at times in the %s table', t)
        a_table_set_deleted_at_q = a_table_t.update().where(and_((a_table_t.c.deleted == 1), (a_table_t.c.deleted_at == None))).values(deleted_at=now)
        a_table_set_deleted_at_q.execute()
def fix_missing_deleted_at(meta, table_names):
    now = datetime.datetime.utcnow()
    for t in table_names:
        a_table_t = Table(t, meta, autoload=True)
        log.info('- action: fixing columns with missing deleted_at times in the %s table', t)
        a_table_set_deleted_at_q = a_table_t.update().where(and_((a_table_t.c.deleted == 1), (a_table_t.c.deleted_at == None))).values(deleted_at=now)
        a_table_set_deleted_at_q.execute()