feat: teach sqlx-cli about migrate.migrations-dir

This commit is contained in:
Austin Bonander
2025-01-15 10:31:03 -08:00
parent 367f2cca98
commit 1ff6a8a950
9 changed files with 163 additions and 91 deletions

View File

@@ -209,7 +209,8 @@ impl PgConnection {
should_fetch: bool,
) -> Result<ColumnOrigin, Error> {
if let Some(origin) =
self.cache_table_to_column_names
self.inner
.cache_table_to_column_names
.get(&relation_id)
.and_then(|table_columns| {
let column_name = table_columns.columns.get(&attribute_no).cloned()?;
@@ -245,6 +246,7 @@ impl PgConnection {
};
let table_columns = self
.inner
.cache_table_to_column_names
.entry(relation_id)
.or_insert_with(|| TableColumns {