impl schema discovery
This commit is contained in:
@@ -22,6 +22,9 @@ struct SeaOrmConfig {
|
||||
with_serde: bool,
|
||||
serde_skip_deserializing_primary_key: bool,
|
||||
serde_skip_hidden_column: bool,
|
||||
max_connections: u32,
|
||||
acquire_timeout: u64,
|
||||
database_schema: Option<String>,
|
||||
}
|
||||
#[derive(Deserialize, Serialize, Debug)]
|
||||
struct SeaOrmTableConfig {
|
||||
@@ -39,6 +42,9 @@ impl Default for Config {
|
||||
only: Vec::new(),
|
||||
exclude: Vec::new(),
|
||||
},
|
||||
database_schema: None,
|
||||
max_connections: 10,
|
||||
acquire_timeout: 30,
|
||||
expanded_format: false,
|
||||
include_hidden_tables: false,
|
||||
with_serde: false,
|
||||
@@ -67,6 +73,6 @@ async fn main() -> Result<()> {
|
||||
.extract()?;
|
||||
tracing::info!(?config);
|
||||
tracing::info!(?args);
|
||||
generate::generate(args.database_url).await;
|
||||
generate::get_tables(args.database_url, config).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user