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

Feature/seed db #13

Merged
merged 5 commits into from
Aug 5, 2024
Merged

Feature/seed db #13

merged 5 commits into from
Aug 5, 2024

Conversation

PaulJWright
Copy link
Owner

@PaulJWright PaulJWright commented Aug 5, 2024

Closes: #8

This merge request introduces key enhancements and new features to the project:

  1. SQLAlchemy Models: Implemented models for tables as outlined in the database design, including:
  • MenuModel
  • IngredientsModel
  • RecipeIngredientModel
  • StockModel

These models represent the core entities and relationships in the database schema, as in the design doc.

  1. Seeding and Clearing Scripts: Addition of a script to seed (and clear) the database. Seeding is based on the /data/*.csv files, and uses location_id to filter and inject data appropriately.

  2. Updated the Dockerfile to include the location_id argument for database seeding, ensuring that the seeding process runs correctly within the Docker container.

the database (data/orders.db) tables can be viewed, e.g.:

Screenshot 2024-08-05 at 11 32 16

@PaulJWright PaulJWright merged commit 5890d05 into main Aug 5, 2024
1 check passed
@PaulJWright PaulJWright deleted the feature/seed_db branch August 5, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Seeding script for DB
1 participant