Skip to content

Compare changes

Choose two branches to see what one has that the other does not, then open a pull request for it.

Open a pull request

1 commit

1 file+5−40/1 viewed
+5−4
22 -- are: each row is a key, its type (secret or config), the environments it
33 -- applies to and who reads it. A key may have one row per environment, so
44 -- the unique (owner, kind, name) constraint goes; the service keeps a
5−-- key's rows from overlapping. Existing rows keep working as before: every
6−-- environment, read by workflows and deployments.
5+-- key's rows from overlapping. Existing rows keep working exactly as before:
6+-- every environment, read by workflows alone, so nothing reaches
7+-- deployments until someone says it should.
78
89 CREATE TABLE settings_v2 (
910 id TEXT PRIMARY KEY,
3132 updated_by TEXT
3233 );
3334
34−INSERT INTO settings_v2 (id, scope, owner, kind, name, value, updated_at)
35− SELECT id, scope, owner, kind, name, value, updated_at FROM settings;
35+INSERT INTO settings_v2 (id, scope, owner, kind, name, value, updated_at, available_to)
36+ SELECT id, scope, owner, kind, name, value, updated_at, 'workflows' FROM settings;
3637 DROP TABLE settings;
3738 ALTER TABLE settings_v2 RENAME TO settings;
3839 CREATE INDEX settings_by_owner ON settings (owner, name);