commit 91fbdfd7e26d2ef28f5b7a8e719a4b5de11d861f parent f55ce5befa2934800f1a3d45124e604077fdf2f5 Author: Özgür Kesim <oec-taler@kesim.org> Date: Thu, 14 Oct 2021 19:38:40 +0200 added SQL-schema adaptations for exchange Diffstat:
| M | design-documents/024-age-restriction.rst | | | 23 | +++++++++++++++++++++-- |
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/design-documents/024-age-restriction.rst b/design-documents/024-age-restriction.rst @@ -161,8 +161,27 @@ apply for each denomination in the list: SQL changes ----------- -TODO: Define schema changes - +The schema for the exchange is changed as follows: + +.. sourcecode:: sql + -- Everything in one big transaction + BEGIN; + -- Check patch versioning is in place. + SELECT _v.register_patch('exchange-TBD', NULL, NULL); + -- + ALTER TABLE denominations + ADD COLUMN age_restricted BOOLEAN NOT NULL DEFAULT (false); + COMMENT ON COLUMN denominations.age_restriced + IS 'true if this denomination can be used for age restriction'; + -- + ALTER TABLE refresh_commitments + ADD COLUMN age_commitment BYTEA ARRAY; + COMMENT ON COLUMN refresh_commitments.age_commitment + IS 'Vector of public keys that represents a commitment to an age. MUST be NULL if in the corresponding denomination .age_restricted equals 'false', MUST NOT be NULL otherwise.` + COMMIT; + +**TODO**: can the contraint (NULL/NOT NULL) on column +``refresh_commitments.age_commitment`` be made explicit in SQL? Protocol changes ----------------