Skip to content

Commit

Permalink
KOGITO-7676: Implement Flyway DB schema migration
Browse files Browse the repository at this point in the history
  • Loading branch information
akumar074 committed Aug 29, 2022
1 parent 2ba9b93 commit 79632d2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,6 @@ mp.messaging.outgoing.kogito-variables-events.topic=kogito-variables-events
mp.messaging.outgoing.kogito-variables-events.value.serializer=org.apache.kafka.common.serialization.StringSerializer

quarkus.http.auth.permission.source-files-addon.paths=/management/*
quarkus.http.auth.permission.source-files-addon.policy=permit
quarkus.http.auth.permission.source-files-addon.policy=permit

kogito.persistence.auto.ddl=false
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

<properties>
<sonar.exclusions>**/KogitoApplication.java</sonar.exclusions>
<kogito.persistence.auto.ddl>false</kogito.persistence.auto.ddl>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -202,4 +203,4 @@
</plugins>
</build>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
kogito.persistence.type=postgresql
kogito.data-index.domain-indexing=false
kogito.data-index.blocking=true
kogito.persistence.auto.ddl=false

#Kafka
quarkus.kafka.health.enabled=true
quarkus.kafka.bootstrap-servers=localhost:9092
%dev.kafka.bootstrap.servers=localhost:9092

#Flyway
quarkus.flyway.migrate-at-start=true
quarkus.flyway.baseline-on-migrate=true

mp.messaging.incoming.kogito-processinstances-events.connector=smallrye-kafka
mp.messaging.incoming.kogito-processinstances-events.topic=kogito-processinstances-events
Expand Down Expand Up @@ -42,4 +46,4 @@ quarkus.hibernate-orm.physical-naming-strategy=org.hibernate.boot.model.naming.C

#Container image
quarkus.container-image.build=${quarkus.build.image:true}
quarkus.container-image.group=org.kie.kogito
quarkus.container-image.group=org.kie.kogito
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

create table attachments (
create table if not exists attachments (
id varchar(255) not null,
content varchar(255),
name varchar(255),
Expand All @@ -9,7 +9,7 @@ create table attachments (
primary key (id)
);

create table comments (
create table if not exists comments (
id varchar(255) not null,
content varchar(255),
updated_at timestamp,
Expand All @@ -18,7 +18,7 @@ create table comments (
primary key (id)
);

create table jobs (
create table if not exists jobs (
id varchar(255) not null,
callback_endpoint varchar(255),
endpoint varchar(255),
Expand All @@ -39,15 +39,15 @@ create table jobs (
primary key (id)
);

create table milestones (
create table if not exists milestones (
id varchar(255) not null,
process_instance_id varchar(255) not null,
name varchar(255),
status varchar(255),
primary key (id, process_instance_id)
);

create table nodes (
create table if not exists nodes (
id varchar(255) not null,
definition_id varchar(255),
enter timestamp,
Expand All @@ -59,7 +59,7 @@ create table nodes (
primary key (id)
);

create table processes (
create table if not exists processes (
id varchar(255) not null,
business_key varchar(255),
end_time timestamp,
Expand All @@ -78,19 +78,19 @@ create table processes (
primary key (id)
);

create table processes_addons (
create table if not exists processes_addons (
process_id varchar(255) not null,
addon varchar(255) not null,
primary key (process_id, addon)
);

create table processes_roles (
create table if not exists processes_roles (
process_id varchar(255) not null,
role varchar(255) not null,
primary key (process_id, role)
);

create table tasks (
create table if not exists tasks (
id varchar(255) not null,
actual_owner varchar(255),
completed timestamp,
Expand All @@ -111,31 +111,31 @@ create table tasks (
primary key (id)
);

create table tasks_admin_groups (
create table if not exists tasks_admin_groups (
task_id varchar(255) not null,
group_id varchar(255) not null,
primary key (task_id, group_id)
);

create table tasks_admin_users (
create table if not exists tasks_admin_users (
task_id varchar(255) not null,
user_id varchar(255) not null,
primary key (task_id, user_id)
);

create table tasks_excluded_users (
create table if not exists tasks_excluded_users (
task_id varchar(255) not null,
user_id varchar(255) not null,
primary key (task_id, user_id)
);

create table tasks_potential_groups (
create table if not exists tasks_potential_groups (
task_id varchar(255) not null,
group_id varchar(255) not null,
primary key (task_id, group_id)
);

create table tasks_potential_users (
create table if not exists tasks_potential_users (
task_id varchar(255) not null,
user_id varchar(255) not null,
primary key (task_id, user_id)
Expand Down

0 comments on commit 79632d2

Please sign in to comment.