feat(bd): V016 create Rubro table con SYSTEM_VERSIONING (CAT-001)

- dbo.Rubro: adjacency list, self-FK, soft-delete, temporal retention 10y
- Filtered unique index UQ_Rubro_ParentId_Nombre_Activo + covering IX_Rubro_ParentId_Activo
- Permission catalogo:rubros:gestionar seeded + assigned to admin role
- V016_ROLLBACK.sql: full reversal script
- RubrosOptions class (MaxDepth=10) + appsettings.json Rubros section
- services.Configure<RubrosOptions> registered in Infrastructure DI
- database/README.md updated with V013-V016 entries
This commit is contained in:
2026-04-18 19:04:24 -03:00
parent 9886524645
commit 0d50d4f3cc
6 changed files with 258 additions and 3 deletions

View File

@@ -29,9 +29,10 @@ database/
| **V010** | **`V010__audit_infrastructure.sql`** | **UDT-010** | **Infra de auditoría + Temporal Tables. Ver nota abajo.** |
| V011 | `V011__create_medio_seccion.sql` | ADM-001 | Medio + Seccion (temporal, retention 10y) + permiso `administracion:secciones:gestionar` |
| V012 | `V012__seed_medios.sql` | ADM-001 | Seed idempotente de Medios ELDIA y ELPLATA |
| V013 | `V013__create_punto_de_venta.sql` | ADM-008 | PuntoDeVenta (temporal) + permiso `administracion:puntosdeventa:gestionar` |
| V014 | `V014__create_tipo_de_iva_ingresos_brutos.sql` | ADM-009 | TipoDeIva + IngresosBrutos (temporales con vigencias) + permiso fiscal |
| V015 | `V015__create_audit_views.sql` | UDT-011 | Vistas `v_AuditEvent_Local` + `v_SecurityEvent_Local` con timezone local |
| V013 | `V013__create_puntos_de_venta.sql` | ADM-008 | PuntosDeVenta (temporal, retention 10y) + permiso `administracion:puntos_de_venta:gestionar` |
| V014 | `V014__create_tablas_fiscales.sql` | ADM-009 | TiposDeIva + IngresosBrutos (versioning por cadena) + permisos fiscales |
| V015 | `V015__create_local_timezone_views.sql` | UDT-011 | Vistas admin con OccurredAt convertido a hora Argentina |
| **V016** | **`V016__create_rubro.sql`** | **CAT-001** | **Rubro (adjacency list, temporal 10y) + permiso `catalogo:rubros:gestionar`** |
## Convenciones