Commit Graph

2 Commits

Author SHA1 Message Date
Adrian Flores Cortes
8a9db6f9d1 [GAP-001,002,003] feat(ddl): Add KPIs, tool loans and depreciation tables
- Add 12-analytics-kpis-ddl.sql with kpis_config and kpis_values tables
- Add tool_loans table with loan_status enum (GAP-002)
- Add depreciation_schedule and depreciation_entries tables (GAP-003)
- Add depreciation_method enum and calculate_monthly_depreciation function

Implements 13 SP of critical gaps identified in EPIC-003.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:46:00 -06:00
Adrian Flores Cortes
e927cafc90 [MAE-015] feat: Add assets schema DDL with 11 tables and 9 ENUMs
- asset_categories: Categorias de activos
- assets: Catalogo principal de activos
- asset_assignments: Asignaciones a proyectos
- maintenance_plans: Planes de mantenimiento preventivo
- maintenance_schedules: Programacion de mantenimientos
- work_orders: Ordenes de trabajo
- work_order_parts: Refacciones utilizadas
- maintenance_history: Historial de mantenimientos
- asset_costs: Costos TCO
- asset_locations: Ubicaciones GPS
- fuel_logs: Registro de combustible

Includes: RLS, indices, triggers, TCO calculation function

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:11:02 -06:00