fix(recovery): restore source removed by production documentation merge

This commit is contained in:
2026-11-10 03:42:10 +01:00
parent 585bdd4b44
commit 3d2fc6f913
957 changed files with 115754 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
-- The GUC is transaction-local and supplied only by trusted server code.
-- RLS is a defense against missing tenant predicates, not authentication.
ALTER TABLE opt_credit_accounts ENABLE ROW LEVEL SECURITY;
ALTER TABLE opt_credit_accounts FORCE ROW LEVEL SECURITY;
CREATE POLICY opt_credit_accounts_tenant ON opt_credit_accounts
USING (tenant_id = current_setting('app.opt_credit_tenant_id', true))
WITH CHECK (tenant_id = current_setting('app.opt_credit_tenant_id', true));
ALTER TABLE opt_credit_reservations ENABLE ROW LEVEL SECURITY;
ALTER TABLE opt_credit_reservations FORCE ROW LEVEL SECURITY;
CREATE POLICY opt_credit_reservations_tenant ON opt_credit_reservations
USING (tenant_id = current_setting('app.opt_credit_tenant_id', true))
WITH CHECK (tenant_id = current_setting('app.opt_credit_tenant_id', true));
ALTER TABLE opt_credit_events ENABLE ROW LEVEL SECURITY;
ALTER TABLE opt_credit_events FORCE ROW LEVEL SECURITY;
CREATE POLICY opt_credit_events_tenant ON opt_credit_events
USING (tenant_id = current_setting('app.opt_credit_tenant_id', true))
WITH CHECK (tenant_id = current_setting('app.opt_credit_tenant_id', true));
ALTER TABLE opt_credit_purchases ENABLE ROW LEVEL SECURITY;
ALTER TABLE opt_credit_purchases FORCE ROW LEVEL SECURITY;
CREATE POLICY opt_credit_purchases_tenant ON opt_credit_purchases
USING (tenant_id = current_setting('app.opt_credit_tenant_id', true))
WITH CHECK (tenant_id = current_setting('app.opt_credit_tenant_id', true));