From a5a13dfcd0b82bea3b24b9ab64bbe642c059145d Mon Sep 17 00:00:00 2001 From: AmirReza Date: Thu, 7 Nov 2024 17:16:20 +0000 Subject: [PATCH 1/3] fix(docs): Add md extension to the readme file Signed-off-by: AmirReza --- alembic/{README => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename alembic/{README => README.md} (100%) diff --git a/alembic/README b/alembic/README.md similarity index 100% rename from alembic/README rename to alembic/README.md From 2a9f779e881f16fe5ea3cafdbcdc28ad6acfc466 Mon Sep 17 00:00:00 2001 From: AmirReza Date: Thu, 7 Nov 2024 17:22:55 +0000 Subject: [PATCH 2/3] doc(alembic): add env vars that are needed to be changed Signed-off-by: AmirReza --- alembic/README.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/alembic/README.md b/alembic/README.md index 5e6abc66..6b663c4f 100644 --- a/alembic/README.md +++ b/alembic/README.md @@ -10,22 +10,30 @@ The following steps should be followed in the Python environment configured for 1. Make sure the environment variables with the database connection details are loaded into the environment. If you are using Azure instance, you will additionally need to make sure it's using the same environment variables to be connected to the database on Azure, as that's in the current state and does not require changes, but to make sure about that, we need to do the next step check. -2. As an initial check, make sure the database is up to date with the head of changes. (If it is not, this step tries to run the migration one by one): +These are the variables that you need to change: +- `POSTGRES_USERNAME` +- `POSTGRES_PASSWORD` +- `POSTGRES_HOST` +- `POSTGRES_PORT` +- `POSTGRES_DB` + +3. As an initial check, make sure the database is up to date with the head of changes. (If it is not, this step tries to run the migration one by one): ```sh alembic upgrade head ``` -3. Create a new revision (Don't forget to update the message) +4. Create a new revision (Don't forget to update the message) ```sh alembic revision --autogenerate -m "PLACE HOLDER FOR MESSAGE" ``` -4. Open the generated migration script under `alembic/versions` and adjust it accordingly by implementing the upgrade function with Alembic operations. `downgrade` function could be left untouched as we don't support downgrade at this time. +5. Open the generated migration script under `alembic/versions` and adjust it accordingly by implementing the upgrade function with Alembic operations. `downgrade` function could be left untouched as we don't support downgrade at this time. -5. Update the database with a head of changes. Alemtic automatically picks up the new migration script and executes it. +6. Update the database with a head of changes. Alemtic automatically picks up the new migration script and executes it. ```sh alembic upgrade head ``` + From acf9d64e636b8a20b663255c36cdad7b4f300a8d Mon Sep 17 00:00:00 2001 From: AmirReza Date: Wed, 13 Nov 2024 13:15:54 +0000 Subject: [PATCH 3/3] fix(numbers): bring the right numbers back Signed-off-by: AmirReza --- alembic/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/alembic/README.md b/alembic/README.md index 6b663c4f..4f675e04 100644 --- a/alembic/README.md +++ b/alembic/README.md @@ -17,21 +17,21 @@ These are the variables that you need to change: - `POSTGRES_PORT` - `POSTGRES_DB` -3. As an initial check, make sure the database is up to date with the head of changes. (If it is not, this step tries to run the migration one by one): +2. As an initial check, make sure the database is up to date with the head of changes. (If it is not, this step tries to run the migration one by one): ```sh alembic upgrade head ``` -4. Create a new revision (Don't forget to update the message) +3. Create a new revision (Don't forget to update the message) ```sh alembic revision --autogenerate -m "PLACE HOLDER FOR MESSAGE" ``` -5. Open the generated migration script under `alembic/versions` and adjust it accordingly by implementing the upgrade function with Alembic operations. `downgrade` function could be left untouched as we don't support downgrade at this time. +4. Open the generated migration script under `alembic/versions` and adjust it accordingly by implementing the upgrade function with Alembic operations. `downgrade` function could be left untouched as we don't support downgrade at this time. -6. Update the database with a head of changes. Alemtic automatically picks up the new migration script and executes it. +5. Update the database with a head of changes. Alemtic automatically picks up the new migration script and executes it. ```sh alembic upgrade head