Commit Graph

4 Commits

Author SHA1 Message Date
mohamad
3738819065 refactor: Simplify upgrade function by directly creating enums and adding new tables for chores and chore assignments in the initial schema
All checks were successful
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Successful in 1m31s
2025-06-01 18:20:31 +02:00
mohamad
c14b432082 refactor: Encapsulate enum creation logic within a dedicated function in the upgrade process for improved readability and maintainability
All checks were successful
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Successful in 1m21s
2025-06-01 18:15:22 +02:00
mohamad
c204c25314 refactor: Modify upgrade function to accept context parameter for enhanced migration flexibility
All checks were successful
Deploy to Production, build images and push to Gitea Registry / build_and_push (pull_request) Successful in 1m21s
2025-06-01 18:12:58 +02:00
google-labs-jules[bot]
a7fbc454a9 Refactor: Reset Alembic migrations and consolidate models.
This commit addresses issues with backend models, schemas, and migrations.

Key changes:
- Consolidated all SQLAlchemy model definitions into `be/app/models.py`.
- Emptied `be/app/models/expense.py` as its contents were duplicates.
- Verified and standardized Base class usage and SQLAlchemy imports in models.
- Confirmed the correctness of self-referential relationships in the `Expense` model.
- Added a clarifying comment to `SplitTypeEnum` regarding future extensibility.
- Corrected a typo in `Settlement.created_by_user_id`.

Migration Cleanup:
- Deleted all existing Alembic migration files from `be/alembic/versions/`.
- Created a new, single initial migration script (`0001_initial_schema.py`) that defines the entire database schema based on the current state of the SQLAlchemy models. This provides a clean slate for future migrations.

This reset was performed because the previous migration history was complex and contained a revision that was incompatible with the current model definitions. Starting fresh ensures consistency between the models and the database schema from the initial point.
2025-06-01 14:26:37 +02:00