forked from wangziqi/gongxue-base
16 lines
748 B
SQL
16 lines
748 B
SQL
create table if not exists app_private.environment_safety (
|
|
id boolean primary key default true check (id),
|
|
environment text not null check (environment in ('local', 'test', 'ci', 'staging', 'production')),
|
|
allow_destructive_tests boolean not null default false,
|
|
created_at timestamptz not null default now(),
|
|
updated_at timestamptz not null default now()
|
|
);
|
|
|
|
comment on table app_private.environment_safety is
|
|
'Fail-closed database marker for destructive integration fixtures. Production and staging must never set allow_destructive_tests=true.';
|
|
|
|
revoke all on app_private.environment_safety from public, anon, authenticated;
|
|
|
|
-- Runtime access is granted centrally by
|
|
-- 202607120013_backend_runtime_roles.sql after the roles exist.
|