Files

15 lines
432 B
SQL

\set ON_ERROR_STOP on
-- The credential normalizer requires this database-level marker in addition
-- to process and URL guards. A loopback SSH tunnel to staging does not carry
-- the marker and therefore cannot trigger the disposable local reset.
DO $local_database_marker$
BEGIN
EXECUTE format(
'ALTER DATABASE %I SET app.local_dev_credentials = %L',
current_database(),
'enabled'
);
END
$local_database_marker$;