Files
Jorem Juárez 506de5e271 Adaptador Reels x Expedientes - versión inicial
Estado tal cual recibido antes de hardening:
- backend Express + Postgres + Anthropic SDK
- frontend Vite + React + nginx proxy
- docker-compose para Coolify
2026-05-26 12:21:05 -06:00

24 lines
780 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- Esquema de la base de datos para el Adaptador Reels × Expedientes
-- Se ejecuta automáticamente al arrancar el backend (idempotente).
CREATE TABLE IF NOT EXISTS reels (
id TEXT PRIMARY KEY,
titulo TEXT NOT NULL,
hook TEXT DEFAULT '',
estructura TEXT DEFAULT '',
tono TEXT DEFAULT '',
formato TEXT DEFAULT '',
notas TEXT DEFAULT '',
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE TABLE IF NOT EXISTS expedientes (
id TEXT PRIMARY KEY,
titulo TEXT NOT NULL,
contenido TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT now()
);
CREATE INDEX IF NOT EXISTS idx_reels_created ON reels (created_at DESC);
CREATE INDEX IF NOT EXISTS idx_exp_created ON expedientes (created_at DESC);