0

JBPM issue with Maria DB Galera were Primary key mandatory. Some tables in JBPM db schema have no primary key.

  • If I add a primary key column along with them what will be the impact?
  • Is there nay other way I can get ride of this problem?

Currently we have Mariadb as the only database option to use.

create table EventTypes (
    InstanceId bigint not null,
    element varchar(255)
) ENGINE=InnoDB;
create table PeopleAssignments_PotOwners (
        task_id bigint not null,
        entity_id varchar(255) not null
) ENGINE=InnoDB;

Source for MariaDB primary Key mandatory: mariadb-galera-cluster-known-limitations

Please help.

1 Answers1

0

PeopleAssignments_PotOwners looks like a many:many mapping table between tasks and entities?? If so, then the 'natural' PRIMARY KEY would be

PRIMARY KEY(task_id, entity_id)

(in either order).

Perhaps ditto for the other table?

More discussion of efficiency in many:many tables: http://mysql.rjweb.org/doc.php/index_cookbook_mysql#many_to_many_mapping_table

If you don't have a 'natural' primary key composed of one (or more) columns, add

id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY
Rick James
  • 135,179
  • 13
  • 127
  • 222