Security Fixes

This commit is contained in:
Eric Gullickson
2025-08-24 14:39:50 -05:00
parent 000e71a026
commit e22d643ae3
19 changed files with 187 additions and 8838 deletions

View File

@@ -12,8 +12,8 @@ Complete database schema for MotoVaultPro Modified Feature Capsule architecture.
### Migration Tracking
- **Table**: `_migrations`
- **Purpose**: Tracks executed migrations per feature
- **Location**: Created by `backend/src/_system/migrations/run-all.ts`
- **Purpose**: Created by `backend/src/_system/migrations/run-all.ts` (not yet used for skipping executed files)
- **Note**: Some SQL files use `IF NOT EXISTS`. Re-running all migrations may fail on indexes without `IF NOT EXISTS`.
## Core Tables
@@ -183,17 +183,7 @@ npm run migrate:all
# Via Docker
make migrate
```
### Run Single Feature
```bash
# In container
npm run migrate:feature vehicles
# Individual features
npm run migrate:feature fuel-logs
npm run migrate:feature maintenance
npm run migrate:feature stations
```
Single-feature migration is not implemented yet.
### Migration Files
- **Location**: `backend/src/features/[feature]/migrations/`
@@ -226,4 +216,4 @@ npm run migrate:feature stations
- Regular pg_dump backups
- Point-in-time recovery
- Read replicas for analytics
- Connection pooling (PgBouncer)
- Connection pooling (PgBouncer)