feat(fullstack): Add file upload
This commit is contained in:
@@ -82,7 +82,7 @@ create table form_element
|
||||
form_element_order integer,
|
||||
is_clonable boolean not null,
|
||||
row_preset_filter_src_col_idx integer,
|
||||
type smallint not null check (type between 0 and 8),
|
||||
type smallint not null check (type between 0 and 9),
|
||||
form_element_sub_section_id uuid not null,
|
||||
id uuid not null,
|
||||
description varchar(255),
|
||||
@@ -152,6 +152,23 @@ create table table_column_mappings
|
||||
form_element_id uuid not null
|
||||
);
|
||||
|
||||
create table uploaded_file
|
||||
(
|
||||
is_temporary boolean not null,
|
||||
size bigint not null,
|
||||
uploaded_at timestamp(6) with time zone not null,
|
||||
application_form_id uuid,
|
||||
id uuid not null,
|
||||
filename varchar(255) not null,
|
||||
form_element_reference varchar(255) not null,
|
||||
mime_type varchar(255) not null,
|
||||
organization_id varchar(255),
|
||||
original_filename varchar(255) not null,
|
||||
storage_path varchar(255) not null,
|
||||
uploaded_by_id varchar(255),
|
||||
primary key (id)
|
||||
);
|
||||
|
||||
create table visibility_conditions
|
||||
(
|
||||
form_element_id uuid not null,
|
||||
@@ -233,6 +250,16 @@ alter table if exists table_column_mappings
|
||||
foreign key (form_element_id)
|
||||
references form_element;
|
||||
|
||||
alter table if exists uploaded_file
|
||||
add constraint FKn866ru0c9ygi5wsqvliv181uj
|
||||
foreign key (application_form_id)
|
||||
references application_form;
|
||||
|
||||
alter table if exists uploaded_file
|
||||
add constraint FKtg323a9339lx0do79gu4eftao
|
||||
foreign key (uploaded_by_id)
|
||||
references app_user;
|
||||
|
||||
alter table if exists visibility_conditions
|
||||
add constraint FK5xuf7bd179ogpq5a1m3g8q7jb
|
||||
foreign key (form_element_id)
|
||||
|
||||
Reference in New Issue
Block a user