db/schema/0200_community.sql

23 lines
703 B
MySQL
Raw Normal View History

2023-07-14 22:13:34 +00:00
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'
]
);