23 lines
703 B
MySQL
23 lines
703 B
MySQL
|
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'
|
||
|
]
|
||
|
);
|