Skip to content

Commit

Permalink
merge branch.sql
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed May 12, 2024
1 parent 965a09e commit 39ba2ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 0 additions & 3 deletions sql/branch.sql

This file was deleted.

5 changes: 5 additions & 0 deletions sql/migrations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3477,3 +3477,8 @@ UPDATE app_conf SET value = '"https://master.apis.dev.openstreetmap.org/api/0.6"
UPDATE app_conf SET value = '"https://master.apis.dev.openstreetmap.org/oauth2/authorize"' WHERE key = 'openstreetmap_auth_url';
UPDATE app_conf SET value = '"xAVaXxy0BwUef4SIo55v7E1ofuC53EN8H-X5232d8Vo"' WHERE key = 'openstreetmap_id';
UPDATE app_conf SET value = '"JtqazsotvWZQ1G6ynYhDlHXouQji-qDwwU2WQW7j-kE"' WHERE key = 'openstreetmap_secret';

-- migration #176
ALTER TABLE recipient_settings
ALTER COLUMN patron_visibilities DROP NOT NULL,
ADD COLUMN patron_countries text CHECK (patron_countries <> '');
8 changes: 6 additions & 2 deletions sql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ COMMENT ON EXTENSION pg_stat_statements IS 'track execution statistics of all SQ

-- database metadata
CREATE TABLE db_meta (key text PRIMARY KEY, value jsonb);
INSERT INTO db_meta (key, value) VALUES ('schema_version', '175'::jsonb);
INSERT INTO db_meta (key, value) VALUES ('schema_version', '176'::jsonb);


-- app configuration
Expand Down Expand Up @@ -173,8 +173,12 @@ CREATE TRIGGER update_profile_visibility

CREATE TABLE recipient_settings
( participant bigint PRIMARY KEY REFERENCES participants
, patron_visibilities int NOT NULL CHECK (patron_visibilities > 0)
, patron_visibilities int CHECK (patron_visibilities > 0)
-- Three bits: 1 is for "secret", 2 is for "private", 4 is for "public".
, patron_countries text CHECK (patron_countries <> '')
-- A comma (,) separated list of uppercase 3-letter ISO country codes, possibly
-- prefixed with a dash (-) indicating that the listed countries are the ones
-- to exclude rather than the ones to allow.
);


Expand Down

0 comments on commit 39ba2ac

Please sign in to comment.