Files
rfc-app/deploy/preview/seed.sql
T

21 lines
1.3 KiB
SQL

-- Synthetic seed for per-PR preview environments (flotilla SPEC §15).
--
-- SYNTHETIC DATA ONLY. This file is version-controlled and reviewable, carries
-- NO real user PII, and is applied by deploy/preview/entrypoint.sh onto a
-- brand-new preview DB AFTER the app's own migrations have created the schema.
-- It must never be applied to a production database.
--
-- Applied best-effort: if a future migration changes a table shape this seed
-- references, the entrypoint logs a warning and the preview still boots (it
-- just shows less content). Keep the inserts conservative and schema-stable;
-- grow richer fixtures (RFCs, branches, threads, PRs) here as the preview's
-- review value warrants — they are reproducible because they live in git.
-- A small synthetic user set covering each role (§6.1 owner/admin/contributor).
-- Negative gitea_ids keep these clear of any real Gitea account id space.
INSERT OR IGNORE INTO users (gitea_id, gitea_login, email, display_name, role) VALUES
(-1, 'preview-owner', 'owner@preview.invalid', 'Preview Owner', 'owner'),
(-2, 'preview-admin', 'admin@preview.invalid', 'Preview Admin', 'admin'),
(-3, 'preview-alice', 'alice@preview.invalid', 'Alice Preview', 'contributor'),
(-4, 'preview-bob', 'bob@preview.invalid', 'Bob Preview', 'contributor');