From d74fabc1091fe90a73e2f2c78bc8cf4c01a8961c Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Wed, 19 Jun 2024 20:23:11 +0800 Subject: [PATCH] Fix --- sea-orm-cli/src/commands/generate.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sea-orm-cli/src/commands/generate.rs b/sea-orm-cli/src/commands/generate.rs index 36fcd8441..31e32af1a 100644 --- a/sea-orm-cli/src/commands/generate.rs +++ b/sea-orm-cli/src/commands/generate.rs @@ -137,7 +137,10 @@ pub async fn run_generate_command( sqlx_connect::(max_connections, url.as_str(), None).await?; println!("Discovering schema ..."); let schema_discovery = SchemaDiscovery::new(connection); - let schema = schema_discovery.discover().await?.collect_unique_indexes(); + let schema = schema_discovery + .discover() + .await? + .merge_indexes_into_table(); let table_stmts = schema .tables .into_iter()