MCPcopy Create free account
hub / github.com/emwalker/digraph / drop_columns

Function drop_columns

backend/src/bin/migrate.rs:140–151  ·  view source on GitHub ↗
(pool: &PgPool)

Source from the content-addressed store, hash-verified

138];
139
140async 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
153static DROP_ITEMS: &[(&str, &str)] = &[
154 ("table", "organization_members"),

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected