db/schema/0200_community.sql
Orion Kindel 4a81f5fbde
Some checks failed
migrate-devel / migrate-devel (push) Failing after 7s
migrate-stage / migrate-stage (push) Failing after 8s
feat: human uid
2023-07-15 22:17:16 -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 human_uuid.huid not null unique default human_uuid.huid()
, 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'
]
);