Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions backend/config/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
user: string
password: string | undefined
database: string
ssl?: any

Check warning on line 31 in backend/config/db.ts

View workflow job for this annotation

GitHub Actions / backend

Unexpected any. Specify a different type

Check warning on line 31 in backend/config/db.ts

View workflow job for this annotation

GitHub Actions / backend

Unexpected any. Specify a different type
}

// ========================================
Expand All @@ -45,8 +45,8 @@
},
aiven: {
host: process.env.AIVEN_DB_HOST || '', // ← MODIFICADO (añadido fallback)
port: parseInt(process.env.AIVEN_DB_PORT || '23225'), // ← MODIFICADO (añadido fallback)
user: process.env.AIVEN_DB_USER || 'avnadmin',
port: parseInt(process.env.AIVEN_DB_PORT || ''),
user: process.env.AIVEN_DB_USER || '',
password: process.env.AIVEN_PASSWORD,
database: process.env.AIVEN_DB_NAME || 'hotel_db',
ssl: isDevelopment
Expand Down Expand Up @@ -80,6 +80,10 @@
throw new Error('❌ Falta AIVEN_DB_HOST en .env')
}

if (environment === 'aiven' && (!config.user || !Number.isInteger(config.port))) {
throw new Error('❌ Faltan AIVEN_DB_USER o AIVEN_DB_PORT en .env')
}

// ========================================
// 📊 LOG DE CONFIGURACIÓN (sin passwords)
// ========================================
Expand Down
2 changes: 1 addition & 1 deletion backend/db-mysql/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ backend/db-mysql/
├── MIGRATIONS_POLICY.md
├── MIGRATION_GUIDE.md
├── INDEX.md # Full table index + incremental migration log
└── mock-data.sql
└── mock-data.sql # Clears module data and loads fictitious data (keeps users and scheduling)
```

## Migration policy (since 2026-05-20)
Expand Down
2 changes: 1 addition & 1 deletion backend/db-mysql/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ db-mysql/
├── README.md
├── MIGRATION_GUIDE.md
├── cleanup-scheduling.sql
└── mock-data.sql
└── mock-data.sql # Vacía los módulos y carga datos ficticios (no toca usuarios ni horarios)
```

---
Expand Down
Loading
Loading