cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

No PK on tasks_aux_workers table

badtenant
Discoverer
500

Does nayone know why there is no PK on tasks_aux_workers table? Is that by design or just an oversight?

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Likes

We're using Galera cluster and missed the PKs as well, they're mandatory. Did a deep dive into the hybris logic, changing it to add the PK would be a night mare... not even thinking to maintenance perspective (future hybris upgrades). Instead we went for the solution (notice the `auto_increment`):

ALTER TABLE tasks_aux_workers ADD COLUMN IDPK int not null auto_increment primary key;
ALTER TABLE tasks_aux_scheduler ADD COLUMN IDPK int not null auto_increment primary key;
INSERT INTO tasks_aux_scheduler (ID, LAST_ACTIVITY_TS, VERSION) VALUES('scheduler', CURRENT_TIMESTAMP(3), 4);

Not sure if this is your case, but may be it helps! Works for us like this without any issues.