diff --git a/ensemble/src/migrations/schema/command.rs b/ensemble/src/migrations/schema/command.rs index 9c6dbd6..2a8303f 100644 --- a/ensemble/src/migrations/schema/command.rs +++ b/ensemble/src/migrations/schema/command.rs @@ -41,7 +41,7 @@ impl ForeignIndex { .expect("failed to build index: foreign column must be specified"); let index_name = self.name.as_ref().map_or_else( - || format!("{}_{}_foreign", self.table, self.column), + || format!("{}_{}_foreign", self.origin_table, self.column), ToString::to_string, );