fix: consolidate database types to single source of truth

BREAKING: Removed duplicate lib/database.types.ts in favor of
lib/supabase/database.types.ts

Problem:
- Database types existed in two locations causing sync issues
- Old lib/database.types.ts was empty (0 bytes)
- Import paths were inconsistent across codebase
- Build failed due to missing type definitions

Solution:
- Generated fresh types from remote Supabase database
- Updated all imports from @/lib/database.types to @/lib/supabase/database.types
- Removed duplicate lib/database.types.ts file

Affected modules:
- lib/auth/server.ts - Auth server utilities
- lib/auth/client.ts - Auth client utilities
- lib/types/client.ts - Client type definitions
- lib/fhir/transforms/patient.ts - FHIR patient transforms
- lib/fhir/transforms/practitioner.ts - FHIR practitioner transforms

Impact: All database queries now use up-to-date type definitions
including new tables (intakes, risk_assessments, encounters, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
colinislit
2025-11-23 12:19:47 +01:00
parent 00ca026382
commit 982b23c4dc
7 changed files with 33 additions and 1616 deletions

View File

@@ -3,7 +3,7 @@
* Convert between Database rows and FHIR Patient resources
*/
import type { Tables, TablesInsert } from '../../database.types';
import type { Tables, TablesInsert } from '../../supabase/database.types';
import type { FHIRPatient } from '../types';
type PatientRow = Tables<'patients'>;

View File

@@ -3,7 +3,7 @@
* Convert between Database rows and FHIR Practitioner resources
*/
import type { Tables, TablesInsert } from '../../database.types';
import type { Tables, TablesInsert } from '../../supabase/database.types';
import type { FHIRPractitioner } from '../types';
type PractitionerRow = Tables<'practitioners'>;