forked from yvv/decision
Travail en cours, sauvegardé à la demande d'orch : le moteur, le serveur et tests/seed_proposals.rs (verts) ; les autres tests et les e2e ne sont pas encore repris. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
52 lines
2.9 KiB
SQL
52 lines
2.9 KiB
SQL
-- Propositions seed (2026-11-02, ADR 0011). Additive only: nothing is dropped,
|
|
-- nothing an older image needs is rewritten.
|
|
--
|
|
-- Yvv, 2026-11-02: « pour le démarrage, conserve un statut particulier pour les
|
|
-- 3 premiers modules. Mais ils ne sont pas en vigueur. Appelle les "Proposition
|
|
-- seed" (intégré par un ou deux clients pour amorcer le mouvement de vote). »
|
|
--
|
|
-- A seed proposal is an open proposal of the seed put forward to start the vote
|
|
-- (I1, E1, E2 of the certification act). It is not in force: it enters like any
|
|
-- proposal, by its threshold. The mark stays on the row once written; what the
|
|
-- API calls `seedProposal` is read from it while the version is open and was
|
|
-- never voted into force (src/docs.rs). An older image ignores the column and
|
|
-- reads the version as an open proposal of the seed.
|
|
ALTER TABLE proposals ADD COLUMN seed_featured INTEGER NOT NULL DEFAULT 0;
|
|
|
|
-- The starting texts in force made seed proposals in an existing base
|
|
-- (src/seed_proposal_amend.rs): decided once per document and article, and
|
|
-- only where nobody has touched the text. With the status, the article's level
|
|
-- of inertia goes low (Yvv, 2026-11-02: « l'amorcer avec une inertie basse »),
|
|
-- only where nobody has touched it either. Each decision is kept here, for the
|
|
-- status and for the level: applied, refused (and why), or present (the base
|
|
-- was born with the seed proposal, at the low level).
|
|
CREATE TABLE seed_proposal_amendments (
|
|
amendment_id TEXT NOT NULL,
|
|
doc_id TEXT NOT NULL REFERENCES documents(id),
|
|
unit_code TEXT NOT NULL,
|
|
proposal_id TEXT, -- the version examined: in force, or the seed proposal found
|
|
outcome TEXT NOT NULL, -- applied | refused | present (the status)
|
|
reason TEXT, -- why it was refused
|
|
from_level TEXT, -- the level found
|
|
to_level TEXT NOT NULL, -- the level seed proposals start at
|
|
level_outcome TEXT NOT NULL, -- applied | refused | present (the level)
|
|
level_reason TEXT, -- why it was refused
|
|
at TEXT NOT NULL,
|
|
PRIMARY KEY (amendment_id, doc_id)
|
|
);
|
|
|
|
-- A floor C changed in an existing document (src/floor_amend.rs), should Yvv
|
|
-- lower it to start (question asked on 2026-11-02; none listed yet): decided
|
|
-- once per document, only if the floor is still the one expected. Each decision
|
|
-- is kept here: applied, refused (and why), or present.
|
|
CREATE TABLE floor_amendments (
|
|
amendment_id TEXT NOT NULL,
|
|
doc_id TEXT NOT NULL REFERENCES documents(id),
|
|
from_floor REAL, -- the floor found
|
|
to_floor REAL NOT NULL,
|
|
outcome TEXT NOT NULL, -- applied | refused | present
|
|
reason TEXT, -- why it was refused
|
|
at TEXT NOT NULL,
|
|
PRIMARY KEY (amendment_id, doc_id)
|
|
);
|