creamy-airport-31349
03/26/2023, 12:03 AMtodos table, however when I tried adding in another table (users) and then tried running cargo shuttle deploy then I got this error.
My main.rs:
rust
#[shuttle_runtime::main]
async fn rocket(
#[shuttle_shared_db::Postgres(
local_uri = "postgres://postgres:{secrets.DB_PASS}@localhost:5432/yousearch"
)]
pool: PgPool,
#[shuttle_secrets::Secrets] secret_store: SecretStore,
) -> shuttle_rocket::ShuttleRocket {
pool.execute(include_str!("../schema.sql"))
.await
.map_err(CustomError::new)?;
}
My schema is pretty simple:
sql
DROP TABLE IF EXISTS todos;
CREATE TABLE todos (id serial PRIMARY KEY, note TEXT NOT NULL);
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
first_name TEXT,
last_name TEXT,
email TEXT,
password TEXT,
user_type TEXT
);
Anyone know what could be happening right now?
My repo is here: https://github.com/GabeMeister/yousearch-api
I'm running Ubuntu 22.04.2 LTS.creamy-airport-31349
03/26/2023, 12:08 AMcargo shuttle logs <deployment_id>agreeable-painting-48846
03/26/2023, 8:17 AM_sqlx_migrations table - otherwise it will try to reapply the same file and fail as the file already existsagreeable-painting-48846
03/26/2023, 8:20 AMcreamy-airport-31349
03/27/2023, 1:51 PMschema.sql file that initialized the database, and then I went to create a new users table, didn't realize I needed a sqlx migrationcreamy-airport-31349
03/27/2023, 1:52 PMagreeable-painting-48846
03/27/2023, 2:17 PMagreeable-painting-48846
03/27/2023, 2:17 PM