MCPcopy Create free account
hub / github.com/SeaQL/sea-orm / main

Function main

examples/graphql_example/migration/src/main.rs:7–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6#[async_std::main]
7async fn main() {
8 #[cfg(debug_assertions)]
9 dotenv().ok();
10
11 let fallback = "sqlite:./db?mode=rwc";
12
13 match std::env::var("DATABASE_URL") {
14 Ok(val) => {
15 println!("Using DATABASE_URL: {val}");
16 }
17 Err(_) => {
18 std::env::set_var("DATABASE_URL", fallback);
19 println!("Set DATABASE_URL: {fallback}");
20 }
21 };
22
23 cli::run_cli(migration::Migrator).await;
24}

Callers

nothing calls this directly

Calls 1

run_cliFunction · 0.85

Tested by

no test coverage detected