db/schema/0200_community.sql
Orion Kindel 56957d380a
Some checks failed
migrate-devel / migrate-devel (push) Failing after 7s
migrate-stage / migrate-stage (push) Failing after 8s
feat: permissions
2023-07-14 21:13:33 -04:00

23 lines
703 B
SQL

select create_newtype_text('public.community_tag');
create table public.community
( id int not null primary key generated always as identity
, uid uuid not null unique default gen_random_uuid()
, deleted boolean not null default false
, tag public.community_tag not null
);
select audit( 'public'
, 'community'
, array[ row('tag', 'public.community_tag')
] :: audited_column[]
, soft_delete => true
);
select immutable( 'public'
, 'community'
, array[ 'id'
, 'uid'
]
);