Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pgsql schema for table ocp_tools_config is wrong #310

Open
gmaruzz opened this issue Feb 22, 2025 · 0 comments
Open

pgsql schema for table ocp_tools_config is wrong #310

gmaruzz opened this issue Feb 22, 2025 · 0 comments

Comments

@gmaruzz
Copy link

gmaruzz commented Feb 22, 2025

as it is now:

CREATE TABLE ocp_tools_config (
  id integer Primary KEY DEFAULT nextval('ocp_tools_config_id_seq'),
  module text NOT NULL UNIQUE,
  param text NOT NULL UNIQUE,
  value text DEFAULT NULL,
  box_id text DEFAULT '' UNIQUE
);

will not allow the insertion of more than one row per module, or per param

in mysql, is the combination of module, param and box_id that must be unique

CREATE TABLE `ocp_tools_config` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `module` varchar(64) NOT NULL,
  `param` varchar(64) NOT NULL,
  `value` blob DEFAULT NULL,
  `box_id` varchar(15) DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `box_key` (`module`,`param`,`box_id`)
);


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant