Skip to content

Commit

Permalink
Allow larger property_name on import (fixes Icinga#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
joni1993 committed Nov 22, 2018
1 parent 01f82b2 commit ba399cc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
6 changes: 6 additions & 0 deletions schema/mysql-migrations/upgrade_158.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE imported_property
MODIFY COLUMN property_name VARCHAR(255) NOT NULL;

INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (158, NOW());
2 changes: 1 addition & 1 deletion schema/mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ CREATE TABLE imported_rowset_row (

CREATE TABLE imported_property (
checksum VARBINARY(20) NOT NULL,
property_name VARCHAR(64) NOT NULL,
property_name VARCHAR(255) NOT NULL,
property_value MEDIUMTEXT NOT NULL,
format enum ('string', 'expression', 'json'),
PRIMARY KEY (checksum),
Expand Down
6 changes: 6 additions & 0 deletions schema/pgsql-migrations/upgrade_158.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
ALTER TABLE imported_property
ALTER COLUMN property_name TYPE character varying(255);

INSERT INTO director_schema_migration
(schema_version, migration_time)
VALUES (158, NOW());
2 changes: 1 addition & 1 deletion schema/pgsql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ CREATE INDEX imported_rowset_row_row_checksum ON imported_rowset_row (row_checks

CREATE TABLE imported_property (
checksum bytea CHECK(LENGTH(checksum) = 20),
property_name character varying(64) NOT NULL,
property_name character varying(255) NOT NULL,
property_value text NOT NULL,
format enum_property_format,
PRIMARY KEY (checksum)
Expand Down

0 comments on commit ba399cc

Please sign in to comment.