From cba3e3db7951d74bde67cf1362e9f95a28f179f1 Mon Sep 17 00:00:00 2001 From: phoenix Date: Wed, 22 Oct 2025 15:48:39 +0000 Subject: [PATCH] tsk-68: Remove run_migrations.txt (#77) Close #68 Reviewed-on: https://git.kundeng.us/phoenix/icarus_auth/pulls/77 Co-authored-by: phoenix Co-committed-by: phoenix --- README.md | 9 ++++++++- run_migrations.txt | 27 --------------------------- 2 files changed, 8 insertions(+), 28 deletions(-) delete mode 100644 run_migrations.txt diff --git a/README.md b/README.md index e36b14e..a0cdba5 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,13 @@ A auth web API services for the Icarus project. # Getting Started +Install the `sqlx` tool to use migrations. +``` +cargo install sqlx-cli +``` +This will be used to scaffold development for local environments. + + The easiest way to get started is through docker. This assumes that docker is already installed on your system. Copy the `.env.docker.sample` as `.env`. Most of the data in the env file doesn't need to be modified. The `SECRET_KEY` variable should be changed since it will be used for token @@ -33,4 +40,4 @@ docker system prune -a ``` To view the OpenAPI spec, run the project and access `/swagger-ui`. If running through docker, -the url would be something like `http://localhost:8000/swagger-ui`. +the url would be something like `http://localhost:8001/swagger-ui`. diff --git a/run_migrations.txt b/run_migrations.txt deleted file mode 100644 index 00583ef..0000000 --- a/run_migrations.txt +++ /dev/null @@ -1,27 +0,0 @@ -TODO: At some point, move this somewhere that is appropriate - -# Make sure role has CREATEDB -ALTER ROLE username_that_needs_permission CREATEDB; - -# Install migrations -cargo install sqlx-cli - -# Make sure to populate DATABASE_URL with correct value. -# By default, the DATABASE_URL found in .env file will be used -export DATABASE_URL="postgres://icarus_op_test:password@localhost/icarus_auth_test" - -# init -sqlx migrate add init_migration -sqlx migrate run - -# Create -sqlx database create - -# Drop -sqlx database drop - -# setup -sqlx database setup - -# Reset -sqlx database reset