addons/common/jbpm-usertask-storage-jpa/src/main/resources/kie-flyway/db/user-tasks/h2/V1.0.0__jBPM_user_task_create.sql [100:164]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    metadata_name   varchar(255) not null,
    metadata_value  varchar(512),
    java_type       varchar(255),
    primary key (task_id, metadata_name)
);

alter table if exists jbpm_user_tasks_potential_users
drop constraint if exists fk_jbpm_user_tasks_potential_users_tid cascade;

alter table if exists jbpm_user_tasks_potential_users
add constraint fk_jbpm_user_fk_tasks_potential_users_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_potential_groups
drop constraint if exists fk_jbpm_user_tasks_potential_groups_tid cascade;

alter table if exists jbpm_user_tasks_potential_groups
add constraint fk_jbpm_user_tasks_potential_groups_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_admin_users
drop constraint if exists fk_jbpm_user_tasks_admin_users_tid cascade;

alter table if exists jbpm_user_tasks_admin_users
add constraint fk_jbpm_user_tasks_admin_users_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_admin_groups
drop constraint if exists fk_jbpm_user_tasks_admin_groups_tid cascade;

alter table if exists jbpm_user_tasks_admin_groups
add constraint fk_jbpm_user_tasks_admin_groups_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_excluded_users
drop constraint if exists fk_jbpm_user_tasks_excluded_users_tid cascade;

alter table if exists jbpm_user_tasks_excluded_users
add constraint fk_jbpm_user_tasks_excluded_users_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_attachments
drop constraint if exists fk_user_tasks_attachments_tid cascade;

alter table if exists jbpm_user_tasks_attachments
add constraint fk_user_tasks_attachments_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_comments
drop constraint if exists fk_user_tasks_comments_tid cascade;

alter table if exists jbpm_user_tasks_comments
add constraint fk_user_tasks_comments_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_inputs
drop constraint if exists fk_jbpm_user_tasks_inputs_tid cascade;

alter table if exists jbpm_user_tasks_inputs
add constraint fk_jbpm_user_tasks_inputs_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_outputs
drop constraint if exists fk_jbpm_user_tasks_outputs_tid cascade;

alter table if exists jbpm_user_tasks_outputs
add constraint fk_jbpm_user_tasks_outputs_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;

alter table if exists jbpm_user_tasks_metadata
drop constraint if exists fk_jbpm_user_tasks_metadata_tid cascade;

alter table if exists jbpm_user_tasks_metadata
add constraint fk_jbpm_user_tasks_metadata_tid foreign key (task_id) references jbpm_user_tasks(id) on delete cascade;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



