diff --git a/schema/mysql-migrations/upgrade_102.sql b/schema/mysql-migrations/upgrade_102.sql new file mode 100644 index 00000000..5607f1ed --- /dev/null +++ b/schema/mysql-migrations/upgrade_102.sql @@ -0,0 +1,13 @@ +UPDATE director_deployment_log SET startup_log = LEFT(startup_log, 20480) || ' + +[..] shortened ' +|| (LENGTH(startup_log) - 40960) +|| ' bytes by Director on schema upgrade [..] + +' || RIGHT(startup_log, 20480) WHERE LENGTH(startup_log) > 61440; + +OPTIMIZE TABLE director_deployment_log; + +INSERT INTO director_schema_migration + (schema_version, migration_time) + VALUES (102, NOW()); diff --git a/schema/mysql.sql b/schema/mysql.sql index bfdd1a81..c8427dab 100644 --- a/schema/mysql.sql +++ b/schema/mysql.sql @@ -1312,4 +1312,4 @@ CREATE TABLE sync_run ( INSERT INTO director_schema_migration SET migration_time = NOW(), - schema_version = 100; + schema_version = 102; diff --git a/schema/pgsql-migrations/upgrade_102.sql b/schema/pgsql-migrations/upgrade_102.sql new file mode 100644 index 00000000..4805d8a2 --- /dev/null +++ b/schema/pgsql-migrations/upgrade_102.sql @@ -0,0 +1,13 @@ +UPDATE director_deployment_log SET startup_log = LEFT(startup_log, 20480) || ' + +[..] shortened ' +|| (LENGTH(startup_log) - 40960) +|| ' bytes by Director on schema upgrade [..] + +' || RIGHT(startup_log, 20480) WHERE LENGTH(startup_log) > 61440; + +VACUUM FULL director_deployment_log; + +INSERT INTO director_schema_migration + (schema_version, migration_time) + VALUES (102, NOW()); diff --git a/schema/pgsql.sql b/schema/pgsql.sql index dab834b7..41ff5fc6 100644 --- a/schema/pgsql.sql +++ b/schema/pgsql.sql @@ -1532,4 +1532,4 @@ CREATE UNIQUE INDEX notification_inheritance ON icinga_notification_inheritance INSERT INTO director_schema_migration (schema_version, migration_time) - VALUES (100, NOW()); + VALUES (102, NOW());