Update to Skynet v7 - Complete documentation restructure
- Nueva estructura de carpetas según Skynet v7 - Añadidos schemas SQL completos - Documentación de entidades, componentes e integraciones - Modelo de seguridad actualizado - Infraestructura y operaciones reorganizadas
This commit is contained in:
36
03_MODELO_DATOS/schemas/08_alfred.sql
Normal file
36
03_MODELO_DATOS/schemas/08_alfred.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- ALFRED - Flujos Predefinidos
|
||||
-- Deploy en DECK PostgreSQL
|
||||
|
||||
-- Flujos predefinidos
|
||||
CREATE TABLE IF NOT EXISTS flujos_predefinidos (
|
||||
id VARCHAR(64) PRIMARY KEY,
|
||||
h_instancia VARCHAR(64) NOT NULL,
|
||||
nombre VARCHAR(100) NOT NULL,
|
||||
descripcion TEXT,
|
||||
pasos JSONB NOT NULL,
|
||||
campos_fijos JSONB DEFAULT '{}',
|
||||
campos_variables JSONB DEFAULT '[]',
|
||||
activo BOOLEAN DEFAULT true,
|
||||
created_at TIMESTAMP DEFAULT NOW(),
|
||||
updated_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- Ejecuciones de flujos
|
||||
CREATE TABLE IF NOT EXISTS flujo_ejecuciones (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
h_flujo VARCHAR(64) REFERENCES flujos_predefinidos(id),
|
||||
h_instancia VARCHAR(64) NOT NULL,
|
||||
h_ejecucion VARCHAR(64) NOT NULL UNIQUE,
|
||||
datos JSONB NOT NULL,
|
||||
estado VARCHAR(20) DEFAULT 'ok',
|
||||
destino VARCHAR(20) DEFAULT 'feldman',
|
||||
notas TEXT,
|
||||
created_at TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
|
||||
-- Indices
|
||||
CREATE INDEX IF NOT EXISTS idx_flujos_h_instancia ON flujos_predefinidos(h_instancia);
|
||||
CREATE INDEX IF NOT EXISTS idx_flujos_activo ON flujos_predefinidos(activo);
|
||||
CREATE INDEX IF NOT EXISTS idx_ejecuciones_h_flujo ON flujo_ejecuciones(h_flujo);
|
||||
CREATE INDEX IF NOT EXISTS idx_ejecuciones_estado ON flujo_ejecuciones(estado);
|
||||
CREATE INDEX IF NOT EXISTS idx_ejecuciones_created ON flujo_ejecuciones(created_at DESC);
|
||||
Reference in New Issue
Block a user