Merge sql schema files
When populating a database we'll create all tables regardless of what is actually required for the current use case.
This commit is contained in:
parent
d54bfddee4
commit
efffe10bad
|
@ -1,24 +0,0 @@
|
|||
create table account (
|
||||
`username` varchar(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`salt` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`active` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
/*
|
||||
* user: icingaadmin
|
||||
* password: icinga
|
||||
*/
|
||||
INSERT INTO account (
|
||||
`username`,
|
||||
`salt`,
|
||||
`password`,
|
||||
`active`
|
||||
)
|
||||
VALUES (
|
||||
'icingaadmin',
|
||||
'57cfd5746224be4f60c25d4e8514bec35ad2d01810723a138756b285898e71b2',
|
||||
'43f8e0588eb39f1a41383b48def0b1fdc45e79b8f67194cccee4453eb3f4ea13',
|
||||
1
|
||||
);
|
|
@ -0,0 +1,14 @@
|
|||
create table account (
|
||||
`username` varchar(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`salt` varchar(255) NOT NULL,
|
||||
`password` varchar(255) NOT NULL,
|
||||
`active` tinyint(1) DEFAULT NULL,
|
||||
PRIMARY KEY (`username`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
|
||||
create table `preference`(
|
||||
`username` VARCHAR(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`key` VARCHAR(100) COLLATE latin1_general_ci NOT NULL,
|
||||
`value` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`username`, `key`)
|
||||
) ENGINE=InnoDB;
|
|
@ -10,19 +10,13 @@ ALTER TABLE ONLY "account"
|
|||
|
||||
CREATE UNIQUE INDEX username_lower_unique_idx ON "account" USING btree (lower((username)::text));
|
||||
|
||||
/*
|
||||
* user: icingaadmin
|
||||
* password: icinga
|
||||
*/
|
||||
INSERT INTO "account" (
|
||||
"username",
|
||||
"salt",
|
||||
"password",
|
||||
"active"
|
||||
)
|
||||
VALUES (
|
||||
'icingaadmin',
|
||||
'57cfd5746224be4f60c25d4e8514bec35ad2d01810723a138756b285898e71b2',
|
||||
'43f8e0588eb39f1a41383b48def0b1fdc45e79b8f67194cccee4453eb3f4ea13',
|
||||
true
|
||||
);
|
||||
create table "preference"(
|
||||
"username" VARCHAR(255) NOT NULL,
|
||||
"key" VARCHAR(100) NOT NULL,
|
||||
"value" VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "preference"
|
||||
ADD CONSTRAINT preference_pkey PRIMARY KEY ("username", "key");
|
||||
|
||||
CREATE UNIQUE INDEX username_and_key_lower_unique_idx ON "preference" USING btree (lower((username)::text), lower((key)::text));
|
|
@ -1,6 +0,0 @@
|
|||
create table `preference`(
|
||||
`username` VARCHAR(255) COLLATE latin1_general_ci NOT NULL,
|
||||
`key` VARCHAR(100) COLLATE latin1_general_ci NOT NULL,
|
||||
`value` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (`username`, `key`)
|
||||
) ENGINE=InnoDB;
|
|
@ -1,10 +0,0 @@
|
|||
create table "preference"(
|
||||
"username" VARCHAR(255) NOT NULL,
|
||||
"key" VARCHAR(100) NOT NULL,
|
||||
"value" VARCHAR(255) NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE ONLY "preference"
|
||||
ADD CONSTRAINT preference_pkey PRIMARY KEY ("username", "key");
|
||||
|
||||
CREATE UNIQUE INDEX username_and_key_lower_unique_idx ON "preference" USING btree (lower((username)::text), lower((key)::text));
|
Loading…
Reference in New Issue