Ensure you have the development environment setup by running the following commands:
conda env create -n extralit -f environment_dev.yml
conda activate extralitModify the [database model code](src/argilla/server/models/database.py) to define the database's declarative schema.
Then, to apply the changes to the database run the following command:
# From your development machine, Set the 4 env variables below, and ensure that ARGILLA_ELASTICSEARCH_HOST and POSTGRES_HOST are reachable
export ARGILLA_ELASTICSEARCH=https://elastic:$ELASTIC_PASSWORD@$ARGILLA_ELASTICSEARCH_HOST
export ARGILLA_DATABASE_URL=postgresql://postgres:$POSTGRES_PASSWORD@$POSTGRES_HOST/postgres
# Run the database migration script
python -m argilla server database migrate
# Run the upgrade
cd src/argilla
alembic revision --autogenerate -m "<Title of the changes>"
alembic upgrade headFor more seasoned contributors, we recommend taking a look at the contributor section in our docs.