Con las encuestas para 3 empresas
This commit is contained in:
@@ -56,6 +56,81 @@ UPDATE public.surveys
|
||||
SET brand_config = '{"org_name":"Empresa Demo","branch_name":"Oficina Central","branch_city":"Asunción"}'::jsonb
|
||||
WHERE id = '30000000-0000-0000-0000-000000000001';
|
||||
|
||||
-- ══════════════════════════════════════════════════════════════
|
||||
-- Etapa 3C — Encuestas piloto (espacio de pruebas real)
|
||||
-- org InQuality: 10000000-0000-0000-0000-000000000002
|
||||
-- org Fundación Solidaridad: 10000000-0000-0000-0000-000000000003
|
||||
-- survey InQuality: 30000000-0000-0000-0000-000000000002
|
||||
-- survey Fundación Solidaridad: 30000000-0000-0000-0000-000000000003
|
||||
-- No tocan el survey demo (30000000-...-0001).
|
||||
-- ══════════════════════════════════════════════════════════════
|
||||
|
||||
-- ── Organización InQuality ────────────────────────────────────
|
||||
INSERT INTO public.organizations (id, name, sector, size_bucket)
|
||||
VALUES (
|
||||
'10000000-0000-0000-0000-000000000002',
|
||||
'InQuality',
|
||||
'Consultoría/Tecnología',
|
||||
'1-50'
|
||||
) ON CONFLICT (id) DO UPDATE SET
|
||||
name = EXCLUDED.name,
|
||||
sector = EXCLUDED.sector,
|
||||
size_bucket = EXCLUDED.size_bucket;
|
||||
|
||||
-- ── Organización Fundación Solidaridad ────────────────────────
|
||||
INSERT INTO public.organizations (id, name, sector, size_bucket)
|
||||
VALUES (
|
||||
'10000000-0000-0000-0000-000000000003',
|
||||
'Fundación Solidaridad',
|
||||
'Sociedad Civil/ONG',
|
||||
'1-50'
|
||||
) ON CONFLICT (id) DO UPDATE SET
|
||||
name = EXCLUDED.name,
|
||||
sector = EXCLUDED.sector,
|
||||
size_bucket = EXCLUDED.size_bucket;
|
||||
|
||||
-- ── Survey InQuality ───────────────────────────────────────────
|
||||
INSERT INTO public.surveys (
|
||||
id, org_id, title, status, is_anonymous,
|
||||
data_sensitivity, security_class, controller_role,
|
||||
consent_version_id, brand_config, k_threshold
|
||||
) VALUES (
|
||||
'30000000-0000-0000-0000-000000000002',
|
||||
'10000000-0000-0000-0000-000000000002',
|
||||
'Mapeo de Cuidadores — 2026',
|
||||
'live',
|
||||
true,
|
||||
'sensible',
|
||||
'confidencial',
|
||||
'A',
|
||||
'20000000-0000-0000-0000-000000000001',
|
||||
'{"org_name": "InQuality", "branch_name": "Equipo InQuality", "branch_city": "Asunción"}',
|
||||
5
|
||||
) ON CONFLICT (id) DO UPDATE SET
|
||||
brand_config = EXCLUDED.brand_config,
|
||||
status = EXCLUDED.status;
|
||||
|
||||
-- ── Survey Fundación Solidaridad ──────────────────────────────
|
||||
INSERT INTO public.surveys (
|
||||
id, org_id, title, status, is_anonymous,
|
||||
data_sensitivity, security_class, controller_role,
|
||||
consent_version_id, brand_config, k_threshold
|
||||
) VALUES (
|
||||
'30000000-0000-0000-0000-000000000003',
|
||||
'10000000-0000-0000-0000-000000000003',
|
||||
'Mapeo de Cuidadores — 2026',
|
||||
'live',
|
||||
true,
|
||||
'sensible',
|
||||
'confidencial',
|
||||
'A',
|
||||
'20000000-0000-0000-0000-000000000001',
|
||||
'{"org_name": "Fundación Solidaridad", "branch_name": "Equipo Fundación", "branch_city": "Asunción"}',
|
||||
5
|
||||
) ON CONFLICT (id) DO UPDATE SET
|
||||
brand_config = EXCLUDED.brand_config,
|
||||
status = EXCLUDED.status;
|
||||
|
||||
-- ── Preguntas: DELETE + INSERT para idempotencia total ────────
|
||||
DELETE FROM public.questions
|
||||
WHERE survey_id = '30000000-0000-0000-0000-000000000001';
|
||||
|
||||
Reference in New Issue
Block a user