add plant integ

This commit is contained in:
gowthaman.b
2024-03-20 14:04:26 +05:30
parent ce1f5f9b04
commit 932657c2b2
3 changed files with 67 additions and 16 deletions

View File

@@ -0,0 +1,23 @@
-- apply changes
create table plant (
sys_pk bigint generated by default as identity not null,
deleted_on timestamp,
current_approval_level integer default 0 not null,
required_approval_levels integer default 0 not null,
deleted boolean default false not null,
version integer default 1 not null,
created_at timestamp default 'now()' not null,
modified_at timestamp default 'now()' not null,
deleted_by varchar(255),
approval_status varchar(8) default 'APPROVED' not null,
tags varchar[] default '{}' not null,
comments jsonb default '[]' not null,
plant_id varchar(255) not null,
plant_name varchar(255) not null,
created_by varchar(255) not null,
modified_by varchar(255) not null,
constraint ck_plant_approval_status check ( approval_status in ('PENDING','APPROVED','REJECTED')),
constraint plantid_idx unique (plant_id),
constraint pk_plant primary key (sys_pk)
);