Skip to content

Creating a new table #481

Answered by alper
alper asked this question in Q&A
Jan 22, 2022 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

I could piece this together:

    let backend = conn.get_database_backend();
    let schema = Schema::new(backend);
    let table_create_statement = schema.create_table_from_entity(FoursquareGmapsMappings);
    let table_create_result = conn.execute(backend.build(&table_create_statement)).await;

    println!("Table create result: {:?}", table_create_result.unwrap());

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@billy1624
Comment options

@alper
Comment options

@billy1624
Comment options

Answer selected by alper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants