Make sql schema files consistent

This commit is contained in:
Yonas Habteab 2023-09-14 17:37:30 +02:00 committed by Johannes Meyer
parent 26cae8b882
commit 864a78302f
2 changed files with 3 additions and 3 deletions

View File

@ -1,7 +1,7 @@
ALTER TABLE icingaweb_schema ALTER TABLE icingaweb_schema
MODIFY COLUMN timestamp bigint unsigned NOT NULL, MODIFY COLUMN timestamp bigint unsigned NOT NULL,
MODIFY COLUMN version varchar(64) NOT NULL, MODIFY COLUMN version varchar(64) NOT NULL,
ADD COLUMN IF NOT EXISTS success enum ('n', 'y') DEFAULT NULL, ADD COLUMN IF NOT EXISTS success enum('n', 'y') DEFAULT NULL,
ADD COLUMN IF NOT EXISTS reason text DEFAULT NULL, ADD COLUMN IF NOT EXISTS reason text DEFAULT NULL,
DROP CONSTRAINT IF EXISTS idx_icingaweb_schema_version, DROP CONSTRAINT IF EXISTS idx_icingaweb_schema_version,
ADD CONSTRAINT idx_icingaweb_schema_version UNIQUE (version); ADD CONSTRAINT idx_icingaweb_schema_version UNIQUE (version);

View File

@ -56,8 +56,8 @@ CREATE TABLE `icingaweb_rememberme`(
CREATE TABLE icingaweb_schema ( CREATE TABLE icingaweb_schema (
id int unsigned NOT NULL AUTO_INCREMENT, id int unsigned NOT NULL AUTO_INCREMENT,
version varchar(64) NOT NULL, version varchar(64) NOT NULL,
timestamp bigint NOT NULL, timestamp bigint unsigned NOT NULL,
success enum ('n', 'y') DEFAULT NULL, success enum('n', 'y') DEFAULT NULL,
reason text DEFAULT NULL, reason text DEFAULT NULL,
PRIMARY KEY (id), PRIMARY KEY (id),