Remove temporary migration
This commit is contained in:
parent
3d5dbfe981
commit
b0c2b6d4d5
|
@ -289,24 +289,7 @@ pub async fn prune_files(file_expiration: i64) {
|
|||
// Migration
|
||||
|
||||
pub fn perform_migration() {
|
||||
let rooms = match get_all_room_ids() {
|
||||
Ok(rooms) => rooms,
|
||||
Err(_) => return,
|
||||
};
|
||||
for room in rooms {
|
||||
let pool = pool_by_room_id(&room);
|
||||
let conn = match pool.get() {
|
||||
Ok(conn) => conn,
|
||||
Err(e) => return error!("Couldn't perform migration due to error: {}.", e),
|
||||
};
|
||||
let stmt = format!("ALTER TABLE {} ADD is_deleted INTEGER", MESSAGES_TABLE);
|
||||
match conn.execute(&stmt, params![]) {
|
||||
Ok(_) => (),
|
||||
Err(e) => return error!("Couldn't perform migration due to error: {}.", e),
|
||||
};
|
||||
// Log the result
|
||||
info!("Successfully performed migration for room: {}.", room);
|
||||
}
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
// Utilities
|
||||
|
|
Loading…
Reference in New Issue