feat: add groupId support and redesign schedule GroupView hierarchy
- Add groupId field to ScheduleClass for admin-defined group identity - Add versioned DB migration system (replaces initTables) to prevent data loss - Redesign GroupView: Trainer → Class Type → Group → Datetimes hierarchy - Group datetimes by day, merge days with identical time sets - Auto-assign groupIds to legacy schedule entries in admin - Add mc_registrations CRUD to db.ts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -78,6 +78,13 @@ src/
|
||||
- Covers all 31 TS/TSX files + 4 CSS files
|
||||
- Update the index when adding/removing/renaming files or exports
|
||||
|
||||
## Database Migrations
|
||||
- **Never drop/recreate the database** — admin data (photos, edits, registrations) lives there
|
||||
- Schema changes go through versioned migrations in `src/lib/db.ts` (`migrations` array)
|
||||
- Add a new entry with the next version number; never modify existing migrations
|
||||
- Migrations run automatically on server start via `runMigrations()` and are tracked in the `_migrations` table
|
||||
- Use `CREATE TABLE IF NOT EXISTS` and column-existence checks (`PRAGMA table_info`) for safety
|
||||
|
||||
## Git
|
||||
- Remote: Gitea at `git.dolgolyov-family.by`
|
||||
- User: diana.dolgolyova
|
||||
|
||||
Reference in New Issue
Block a user