Alembic migrations working with argilla as Python package #2511
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR include changes to allow alembic database migrations work as expected with argilla built as a Python package.
I have moved
alembic.ini
from root project tosrc/argilla/alembic.ini
. With this change we can't executealembic
anymore without specifying wherealembic.ini
is with--config
parameter.So in order to execute
alembic
command in development we need to set--config parameter
:Alternatively we can set
ALEMBIC_CONFIG
:I followed the steps below to test the changes:
Create a testing environment to build the argilla package
Build the package
Only building the python code for testing purposes:
Install the package
Testing that changes are working
These command should be executed outside argilla root project path, to be sure that everything is working running with the installed Python package.
Running database migrations (default SQLite):
Running database migrations with PostreSQL:
Adding user with default credentials (default SQLite):
Adding user with default credentials with PostgreSQL: