mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-12-25 04:49:05 +01:00
Fix database migration order
This commit is contained in:
parent
797d5da80b
commit
df240c2394
@ -48,13 +48,6 @@ CREATE TABLE IF NOT EXISTS jobtag (
|
|||||||
FOREIGN KEY (job_id) REFERENCES job (id) ON DELETE CASCADE,
|
FOREIGN KEY (job_id) REFERENCES job (id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (tag_id) REFERENCES tag (id) ON DELETE CASCADE);
|
FOREIGN KEY (tag_id) REFERENCES tag (id) ON DELETE CASCADE);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS configuration (
|
|
||||||
username varchar(255),
|
|
||||||
confkey varchar(255),
|
|
||||||
value varchar(255),
|
|
||||||
PRIMARY KEY (username, confkey),
|
|
||||||
FOREIGN KEY (username) REFERENCES user (username) ON DELETE CASCADE ON UPDATE NO ACTION);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS user (
|
CREATE TABLE IF NOT EXISTS user (
|
||||||
username varchar(255) PRIMARY KEY NOT NULL,
|
username varchar(255) PRIMARY KEY NOT NULL,
|
||||||
password varchar(255) DEFAULT NULL,
|
password varchar(255) DEFAULT NULL,
|
||||||
@ -62,3 +55,12 @@ CREATE TABLE IF NOT EXISTS user (
|
|||||||
name varchar(255) DEFAULT NULL,
|
name varchar(255) DEFAULT NULL,
|
||||||
roles varchar(255) NOT NULL DEFAULT "[]",
|
roles varchar(255) NOT NULL DEFAULT "[]",
|
||||||
email varchar(255) DEFAULT NULL);
|
email varchar(255) DEFAULT NULL);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS configuration (
|
||||||
|
username varchar(255),
|
||||||
|
confkey varchar(255),
|
||||||
|
value varchar(255),
|
||||||
|
PRIMARY KEY (username, confkey),
|
||||||
|
FOREIGN KEY (username) REFERENCES user (username) ON DELETE CASCADE ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,13 +42,6 @@ PRIMARY KEY (job_id, tag_id),
|
|||||||
FOREIGN KEY (job_id) REFERENCES job (id) ON DELETE CASCADE,
|
FOREIGN KEY (job_id) REFERENCES job (id) ON DELETE CASCADE,
|
||||||
FOREIGN KEY (tag_id) REFERENCES tag (id) ON DELETE CASCADE);
|
FOREIGN KEY (tag_id) REFERENCES tag (id) ON DELETE CASCADE);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS configuration (
|
|
||||||
username varchar(255),
|
|
||||||
confkey varchar(255),
|
|
||||||
value varchar(255),
|
|
||||||
PRIMARY KEY (username, confkey),
|
|
||||||
FOREIGN KEY (username) REFERENCES user (username) ON DELETE CASCADE ON UPDATE NO ACTION);
|
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS user (
|
CREATE TABLE IF NOT EXISTS user (
|
||||||
username varchar(255) PRIMARY KEY NOT NULL,
|
username varchar(255) PRIMARY KEY NOT NULL,
|
||||||
password varchar(255) DEFAULT NULL,
|
password varchar(255) DEFAULT NULL,
|
||||||
@ -56,3 +49,12 @@ ldap tinyint NOT NULL DEFAULT 0, /* col called "ldap" for historic reas
|
|||||||
name varchar(255) DEFAULT NULL,
|
name varchar(255) DEFAULT NULL,
|
||||||
roles varchar(255) NOT NULL DEFAULT "[]",
|
roles varchar(255) NOT NULL DEFAULT "[]",
|
||||||
email varchar(255) DEFAULT NULL);
|
email varchar(255) DEFAULT NULL);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS configuration (
|
||||||
|
username varchar(255),
|
||||||
|
confkey varchar(255),
|
||||||
|
value varchar(255),
|
||||||
|
PRIMARY KEY (username, confkey),
|
||||||
|
FOREIGN KEY (username) REFERENCES user (username) ON DELETE CASCADE ON UPDATE NO ACTION);
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user