diff --git a/src/main/resources/dbmigration/1.1.sql b/src/main/resources/dbmigration/1.1.sql new file mode 100644 index 0000000..cb13b53 --- /dev/null +++ b/src/main/resources/dbmigration/1.1.sql @@ -0,0 +1,27 @@ +-- apply changes +create table anon_session ( + 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, + first_seen_at timestamp, + last_seen_at timestamp, + 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, + tenant_id varchar(255) not null, + session_id varchar(255), + ip varchar(255), + header_map jsonb not null, + created_by varchar(255) not null, + modified_by varchar(255) not null, + constraint ck_anon_session_approval_status check ( approval_status in ('PENDING','APPROVED','REJECTED')), + constraint unique_session_id unique (session_id), + constraint pk_anon_session primary key (sys_pk) +); + diff --git a/src/main/resources/dbmigration/model/1.1.model.xml b/src/main/resources/dbmigration/model/1.1.model.xml new file mode 100644 index 0000000..bd6e0c1 --- /dev/null +++ b/src/main/resources/dbmigration/model/1.1.model.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file