mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2026-01-03 11:34:54 +01:00
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: tonya <tonya@tokia.dev>
14 lines
448 B
SQL
14 lines
448 B
SQL
-- +goose Up
|
|
alter table public.attachments
|
|
alter column item_attachments drop not null;
|
|
|
|
alter table public.attachments
|
|
add attachment_thumbnail uuid;
|
|
|
|
alter table public.attachments
|
|
add constraint attachments_attachments_thumbnail
|
|
foreign key (attachment_thumbnail) references public.attachments (id);
|
|
|
|
alter table public.attachments
|
|
add constraint attachments_no_self_reference
|
|
check (id != attachment_thumbnail); |