I have a functioning database that I want to add and remove tables from programmatically. This was easy to do in Python using the records library but I can’t figure it out in Rust using diesel.
I can do drop table users
if the users table already exists but how do I create a users table using the schema I’ve created (the table macro)? The guides I’ve found only cover doing this in the CLI tool but that isn’t useful to me. I just want to do something like:
diesel::create(users).execute(&conn)?;
or maybe
users.create::<User>(&conn);
or whatever other formats
What am I not understanding?