Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Database Seed Script #74

Merged
merged 5 commits into from
Jan 6, 2025
Merged

New Database Seed Script #74

merged 5 commits into from
Jan 6, 2025

Conversation

jurmy24
Copy link
Member

@jurmy24 jurmy24 commented Jan 3, 2025

What changed

I updated the database seed script to use alembic migrations. Now the command python -m scripts.database.seed --create --sample-data --vector-data chunks_BAAI.json resets the database, runs the alembic migrations, and adds seed data (chunks as well), all while keeping in sync with alembic versioning.

I also made the Makefile use the same.

Previously we just created the tables in the database with sqlmodel but
if we're using alembic together with this for migrations afterwards we
get some versioning issues. Now the seed.py script removes all tables,
types, and alembic table, and then regenerates them according to the
most recent script.
@jurmy24 jurmy24 added the enhancement New feature or request label Jan 3, 2025
@jurmy24 jurmy24 merged commit ccc7281 into development Jan 6, 2025
4 checks passed
@jurmy24 jurmy24 deleted the feature/db-seed-procedure branch January 6, 2025 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants