schema/pgsql: allow for longer (> 255) commands

This has already been fixed for MySQL time ago.

refs #11315
This commit is contained in:
Thomas Gelf 2016-03-06 19:28:21 +01:00
parent 8cc7b0834e
commit 6377ed4bc7
2 changed files with 9 additions and 3 deletions

View File

@ -0,0 +1,7 @@
ALTER TABLE icinga_command ALTER COLUMN command TYPE text;
ALTER TABLE icinga_command ALTER COLUMN command DROP DEFAULT;
ALTER TABLE icinga_command ALTER COLUMN command SET DEFAULT NULL;
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (83, NOW());

View File

@ -324,9 +324,8 @@ CREATE TABLE icinga_command (
object_type enum_object_type_all NOT NULL,
disabled enum_boolean NOT NULL DEFAULT 'n',
methods_execute character varying(64) DEFAULT NULL,
command character varying(255) DEFAULT NULL,
command text DEFAULT NULL,
-- env text DEFAULT NULL,
-- vars text DEFAULT NULL,
timeout smallint DEFAULT NULL,
zone_id integer DEFAULT NULL,
PRIMARY KEY (id),
@ -1426,4 +1425,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance
-- set current schema version
INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (82, NOW());
VALUES (83, NOW());