Skip to content

Commit

Permalink
prevent duplicated index names
Browse files Browse the repository at this point in the history
  • Loading branch information
m1guelpf committed Sep 2, 2023
1 parent f5aa0e0 commit 70a8591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ensemble/src/migrations/schema/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Expand Down

0 comments on commit 70a8591

Please sign in to comment.