I am batman

This commit is contained in:
2026-07-12 20:26:16 -04:00
commit 5a3a6357cf
37 changed files with 2938 additions and 0 deletions

15
.github/instructions/database.md vendored Normal file
View File

@@ -0,0 +1,15 @@
# Database Instructions
## Scope
- Applies to GORM models in `internal/models` and migration behavior in `internal/database/database.go`.
## Rules
- Define explicit foreign keys for non-trivial relations (`foreignKey`, `references`) to avoid inference errors.
- Avoid introducing `NOT NULL` constraints on existing populated tables without a backfill plan.
- Keep `AutoMigrate` additive-first; prefer safe schema transitions over breaking changes.
- Use deterministic ordering fields (`position`) for UI-driven entities (kanban sections/tasks).
- Ensure seed data aligns with current schema and relation requirements.
## Migration Safety
- For legacy data, introduce nullable columns first, backfill, then tighten constraints in a later step.
- Never assume empty tables in shared dev environments.