Skip to content

Commit

Permalink
Merge pull request #74 from Project-OMOTES/73-update-alembic-script-a…
Browse files Browse the repository at this point in the history
…nd-readme-to-reflect-new-upgrade-during-startup-situation

delete alembic script and update readme
  • Loading branch information
MarkTNO authored Oct 15, 2024
2 parents b16c978 + e2ae347 commit 4b08a72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 31 deletions.
19 changes: 4 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ extension `.sh).

- `create_venv`: Creates a local virtual environment (`.venv/`) in which all dependencies may be
installed.
- `db_models_apply_schema`: Will apply all available SQL db schema revisions to the local SQL
database.
- `db_models_generate_new_revision`: Can be used to generate a new revision of the SQL db schema.
Expects 1 argument
e.g. `ci/linux/db_models_generate_new_revision.sh "this is the revision message`.
Expand Down Expand Up @@ -103,22 +101,13 @@ This will update the reference to point to the correct submodule commit.

First set up the development environment with `create_venv` and `install_dependencies`. Then you
can make the necessary changes to `omotes_orchestrator/db_models/`. Finally, a new SQL schema
revision may be generated using `alembic` by running `db_models_generate_new_revision`. In order to
apply
all database revisions you can run `db_models_apply_schema`.

Do not forget to actually start the PostgreSQL database locally!
This may be done with:

revision may be generated using `alembic` by running:
```bash
cd computation-engine-at-orchestrator/
cp .env-template .env
./scripts/setup.sh
./scripts/start_postgres_in_dev_mode.sh # This will start PostgreSQL with port 5432 opened on localhost
cd ../
./ci/linux/db_models_apply_schema.sh # Setup will not apply the current schema but only create the SQL database.
./ci/linux/db_models_generate_new_revision.sh "revision message"
```

All database revisions will be automatically applied when the orchestrator is started.

## Direct Alembic control

In case more control is necessary, you can run the necessary alembic commands directly after
Expand Down
9 changes: 0 additions & 9 deletions ci/linux/db_models_apply_schema.sh

This file was deleted.

7 changes: 0 additions & 7 deletions ci/win32/db_models_apply_schema.cmd

This file was deleted.

0 comments on commit 4b08a72

Please sign in to comment.