make pg_session_jwt instalation optional with a cli flag

This commit is contained in:
Ruslan Talpa
2025-06-20 10:17:32 +03:00
parent 3e36d516c2
commit 6bd15908fb
16 changed files with 87 additions and 33 deletions

View File

@@ -0,0 +1,18 @@
CREATE SCHEMA IF NOT EXISTS tenant1;
CREATE TABLE IF NOT EXISTS tenant1.items (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL
);
INSERT INTO tenant1.items (name) VALUES
('tenant1 item 1'),
('tenant1 item 2'),
('tenant1 item 3');
CREATE ROLE tenant1_role NOINHERIT;
GRANT ROLE tenant1_role TO authenticator;
GRANT USAGE ON SCHEMA tenant1 TO tenant1_role;
GRANT ALL ON ALL TABLES IN SCHEMA tenant1 TO tenant1_role;