feat(F-002): database foundation with migrations and dev compose

- node-pg-migrate + pg: baseline migration (extensions, app_meta) with working down
- src/infrastructure/db fail-fast pool and typed query helper
- docker-compose: postgres:16-alpine + redis:7-alpine with one-command up
- table naming convention <module>_<table> documented in README
- integration tests (6) against real PostgreSQL; strict identifier validation
  for test DDL after security-gate hardening round
- deps justified in spec/tech.md; all gates approved; verify.sh green
This commit is contained in:
rikrdo
2026-08-14 22:00:16 +02:00
parent 1d4eebca54
commit 425fedd13e
30 changed files with 1197 additions and 14 deletions

View File

@@ -16,6 +16,9 @@
| vitest | ^3 | Tests unit/integración TS-native (dev) |
| eslint + @eslint/js + typescript-eslint + eslint-config-prettier | ^9 / ^8 / ^10 | Linting estándar (dev) |
| prettier | ^3 | Formato consistente (dev) |
| pg | ^8 | Driver PostgreSQL estándar; única forma de hablar con la DB (F-002) |
| node-pg-migrate | ^8 | Migraciones SQL up/down trackeadas en DB; elegida sobre runner propio (no reinvención) y sobre Flyway/golang-migrate (toolchains ajenos a Node) (F-002) |
| @types/pg | ^8 | Tipos para pg (dev) (F-002) |
Regla: toda dependencia nueva debe agregarse a esta tabla con justificación en el ticket que la introduce.