(pool: &PgPool)
| 138 | ]; |
| 139 | |
| 140 | async fn drop_columns(pool: &PgPool) -> Result<()> { |
| 141 | for (table, column) in DROP_COLUMNS { |
| 142 | log::info!("dropping column {} from {} table", column, table); |
| 143 | sqlx::query(&format!( |
| 144 | "alter table {table} drop column if exists {column}" |
| 145 | )) |
| 146 | .execute(pool) |
| 147 | .await?; |
| 148 | } |
| 149 | |
| 150 | Ok(()) |
| 151 | } |
| 152 | |
| 153 | static DROP_ITEMS: &[(&str, &str)] = &[ |
| 154 | ("table", "organization_members"), |