diff --git a/backend/src/_system/migrations/run-all.ts b/backend/src/_system/migrations/run-all.ts index 136a8f3..a5d6e49 100644 --- a/backend/src/_system/migrations/run-all.ts +++ b/backend/src/_system/migrations/run-all.ts @@ -17,7 +17,8 @@ const pool = new Pool({ const MIGRATION_ORDER = [ 'features/vehicles', // Primary entity, defines update_updated_at_column() 'features/platform', // Normalized make/model/trim schema for dropdowns - 'features/documents', // Depends on vehicles; provides documents table + 'features/user-profile', // User profile management; needed by documents migration + 'features/documents', // Depends on vehicles, user-profile; provides documents table 'core/user-preferences', // Depends on update_updated_at_column() 'features/fuel-logs', // Depends on vehicles 'features/maintenance', // Depends on vehicles @@ -25,7 +26,6 @@ const MIGRATION_ORDER = [ 'features/admin', // Admin role management and oversight; depends on update_updated_at_column() 'features/backup', // Admin backup feature; depends on update_updated_at_column() 'features/notifications', // Depends on maintenance and documents - 'features/user-profile', // User profile management; independent 'features/terms-agreement', // Terms & Conditions acceptance audit trail 'features/audit-log', // Centralized audit logging; independent 'features/ownership-costs', // Depends on vehicles and documents; TCO recurring costs