Commit Graph

51 Commits

Author SHA1 Message Date
041cbff783 Add migration for assignment_type column
- Creates migration 004_add_assignment_type.py
- Adds assignment_type VARCHAR(20) to chores table
- Default value: 'any_one' for backward compatibility
- Values: 'any_one' (only one needs to complete) or 'all_assigned' (all must complete)
- Safe to run on existing database
2026-02-02 21:38:25 +11:00
a41132c411 Add avatar_url and birthday fields to user schemas for image upload and birthday filtering 2026-02-02 12:24:05 +11:00
e079baa865 Fix: Convert empty string to None for due_date field in update_chore
When updating a chore with an empty due_date field, SQLite was throwing an error
because it only accepts Python datetime and date objects, not empty strings.

This fix checks if due_date is an empty string and converts it to None before
setting the attribute, preventing the TypeError.

Error fixed: "SQLite DateTime type only accepts Python datetime and date objects as input"
2026-02-02 11:48:36 +11:00
21c76d9f1a Fix field name mismatch: Change assigned_to_id to assigned_user_id in demo chores to match Chore model definition 2026-02-01 21:39:31 +11:00
0c5dbb7ad7 Add points field to Chore model to support point-based reward system 2026-02-01 13:30:44 +11:00
0a8489a89c Fix: Update init_db.py to use correct import paths
- Changed imports to use app.core.database and app.models structure
- Added Base import from app.core.database (not app.models)
- Fixed imports to match actual project structure
- Added comprehensive demo data with 5 users and 12 chores
- Fixes ModuleNotFoundError when running database initialization
2026-01-31 23:00:59 +11:00
b351c216b3 Fix: Add ENVIRONMENT and CORS_ORIGINS fields to Settings class
- Added ENVIRONMENT field (str, default: "development") to match .env file
- Renamed ALLOWED_ORIGINS to CORS_ORIGINS to match .env file
- Updated cors_origins property to use CORS_ORIGINS instead of ALLOWED_ORIGINS
- Fixes Pydantic validation error when loading settings from .env
2026-01-31 22:57:54 +11:00
615f8a8eac Update dependencies to versions with pre-built wheels for Windows 2026-01-30 22:11:44 +11:00
9b02ebd49f Add demo chore data to database initialization 2026-01-28 21:18:19 +11:00
c36c005166 Create database initialization script with full schema 2026-01-28 19:41:48 +11:00
99f0c694bd Add GET /api/v1/users endpoint for admin to list all users 2026-01-28 17:40:33 +11:00
aede5167d8 Add user profile update endpoints (self-update and admin update) 2026-01-28 17:26:04 +11:00
00230f9994 Add field validator to accept date strings and convert to datetime 2026-01-28 17:25:40 +11:00
b5526d6e2f Add migration script for discord_id and profile_picture columns 2026-01-28 17:22:23 +11:00
dfdc1d83be Add discord_id and profile_picture to user schemas, add UserAdminUpdate for admin actions 2026-01-28 17:22:12 +11:00
2d5a7076f1 Add discord_id and profile_picture fields to User model 2026-01-28 17:21:47 +11:00
b76fcbdb84 Update ChoreFrequency enum: replace adhoc with on_trigger 2026-01-28 17:04:31 +11:00
3f73ead13f Change email field from EmailStr to str to allow .local domains 2026-01-28 15:14:04 +11:00
6099b87db9 Add 10.0.0.127:5173 to CORS allowed origins 2026-01-28 12:01:36 +11:00
1f58169043 Import both User and Chore models to fix relationships 2026-01-28 08:23:59 +11:00
7eb45c8b93 Fix User-Chore relationship with lazy loading 2026-01-28 08:23:46 +11:00
fb53891bc2 Fix import: get_current_user from auth module not security 2026-01-27 23:05:11 +11:00
9ce049abb5 Add chores router to main app 2026-01-27 22:28:01 +11:00
ecf14bda69 Add chores API endpoints with CRUD operations 2026-01-27 22:27:41 +11:00
08192a089e Add chore schemas for API requests/responses 2026-01-27 22:26:48 +11:00
d077647158 Pin bcrypt to 4.0.1 for compatibility with passlib 2026-01-26 22:55:35 +11:00
5284cce20d Fix default password - use shorter password for bcrypt 2026-01-26 22:26:44 +11:00
1729d07b64 Add email-validator dependency 2026-01-26 22:26:24 +11:00
54b9d96850 Update main.py to use cors_origins property 2026-01-26 22:18:48 +11:00
6d83d89073 Fix ALLOWED_ORIGINS to accept comma-separated string 2026-01-26 22:17:18 +11:00
370b600916 Add user management endpoints 2026-01-26 21:56:52 +11:00
b0349f641e Add authentication endpoints 2026-01-26 21:56:38 +11:00
5dcdee7afd Add api/v1 __init__.py 2026-01-26 21:56:24 +11:00
1eea6692e8 Add api __init__.py 2026-01-26 21:56:20 +11:00
c84e173a7f Add Auth schemas 2026-01-26 21:56:15 +11:00
e74f5d717f Add User schemas 2026-01-26 21:56:10 +11:00
742a9c9880 Add schemas __init__.py 2026-01-26 21:56:04 +11:00
5a022ebcb2 Add Meal model 2026-01-26 21:55:58 +11:00
0a17ecf1a8 Add Chore model 2026-01-26 21:55:51 +11:00
5d79f10f85 Add User model 2026-01-26 21:55:43 +11:00
c87dd94ef8 Add models __init__.py 2026-01-26 21:55:35 +11:00
15d13d5225 Add security utilities 2026-01-26 21:55:30 +11:00
93a65fb29d Add database configuration 2026-01-26 21:55:21 +11:00
5619820413 Add core __init__.py 2026-01-26 21:55:14 +11:00
dc20f50fa2 Add core configuration 2026-01-26 21:55:09 +11:00
d4a691bb1e Add app __init__.py 2026-01-26 21:55:02 +11:00
48e1ea9f6b Add main FastAPI application 2026-01-26 21:54:58 +11:00
9b565d0ff4 Add database initialization script 2026-01-26 21:54:50 +11:00
939e933823 Add backend requirements.txt 2026-01-26 21:54:36 +11:00
c3424c7f29 Add backend Dockerfile 2026-01-26 21:54:31 +11:00