Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Incrementing problem #6114

Closed
wants to merge 1 commit into from
Closed

Incrementing problem #6114

wants to merge 1 commit into from

Conversation

jben94
Copy link

@jben94 jben94 commented Mar 6, 2018

The 'cb_list_id' field is not auto-incrementing

The 'cb_list_id' field is not auto-incrementing
@lpinsivy
Copy link
Contributor

@ganoze can you give me your opinion on this PR please?

@lpinsivy lpinsivy added the status/more-info-needed Waiting for more information label Feb 18, 2019
Copy link
Contributor

@ganoze ganoze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO the patch itself is good but should be integrated in more recent update scripts (for both the 2.8 and the 18.10 branches). Code should be slightly different too, as the query needs to be executed only if the existing row does not exist yet.

@cgagnaire cgagnaire added pr/external PR made by the contributors status/needs-attention The PR is on-hold. The reasons are specified in the PR labels Feb 5, 2020
@cgagnaire
Copy link

Hi @jben94,
Sorry for the delay :D
We are trying to catch up with old PR opened by community.
We are wondering what is the error, or how did you find the problem here ?
Can you help us, if you remember of course :)

@jben94
Copy link
Author

jben94 commented Jun 3, 2020

Hi @cgagnaire,

Yes a long time ago! ;)
The problem is that the table 'cb_list' does not have autoincrement so the request fails and the update blocks.

Centreon 19.10.10 :

CREATE TABLE `cb_list` (
	`cb_list_id` INT(11) NOT NULL,
	`cb_field_id` INT(11) NOT NULL,
	`default_value` VARCHAR(255) NULL DEFAULT NULL COLLATE 'latin1_swedish_ci',
	PRIMARY KEY (`cb_list_id`, `cb_field_id`) USING BTREE,
	UNIQUE INDEX `cb_field_idx_01` (`cb_field_id`) USING BTREE,
	INDEX `fk_cb_list_1` (`cb_field_id`) USING BTREE,
	CONSTRAINT `fk_cb_list_1` FOREIGN KEY (`cb_field_id`) REFERENCES `centreon`.`cb_field` (`cb_field_id`) ON UPDATE NO ACTION ON DELETE CASCADE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
;

@sonarqube-decoration
Copy link

SonarQube Quality Gate:
Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@lpinsivy
Copy link
Contributor

We didn't manage 2.8.x version anymore.

@lpinsivy lpinsivy closed this Jul 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/install kind/bug pr/external PR made by the contributors priority/trivial status/more-info-needed Waiting for more information status/needs-attention The PR is on-hold. The reasons are specified in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants