Task summary
Add a deterministic SQL seed script in supabase/seed.sql to provide a reproducible local database environment for new contributors.
Estimated scope / difficulty
Intermediate / DevEx (2 to 4 hours)
Motivation and context
New contributors setting up ClassHub locally with the Supabase CLI need ready-to-use sample sections, subjects, timetable slots, attendance logs, and announcements so they can immediately develop and test features without manually inserting database rows or accessing production credentials.
Relevant files and code pointers
supabase/seed.sql (New file)
supabase/migrations/ (Reference for active table schema and foreign keys)
docs/backend.md
CONTRIBUTING.md
Acceptance criteria
Implementation guide and hints
- Inspect the latest migration files in
supabase/migrations/ to match column names and table constraints.
- Ensure insert order respects foreign key hierarchies:
sections -> users / subjects -> timetable_slots / announcements / attendance_records.
Task summary
Add a deterministic SQL seed script in
supabase/seed.sqlto provide a reproducible local database environment for new contributors.Estimated scope / difficulty
Intermediate / DevEx (2 to 4 hours)
Motivation and context
New contributors setting up ClassHub locally with the Supabase CLI need ready-to-use sample sections, subjects, timetable slots, attendance logs, and announcements so they can immediately develop and test features without manually inserting database rows or accessing production credentials.
Relevant files and code pointers
supabase/seed.sql(New file)supabase/migrations/(Reference for active table schema and foreign keys)docs/backend.mdCONTRIBUTING.mdAcceptance criteria
supabase/seed.sqlfile containing deterministic mock data for a demo college section (Section P2).supabase db reset.CONTRIBUTING.mdanddocs/backend.md.npm testandnpm run lintpass with 0 errors.Implementation guide and hints
supabase/migrations/to match column names and table constraints.sections->users/subjects->timetable_slots/announcements/attendance_records.