[icinga-checkins] icinga.org: icingaweb2-module-director/master: schema/mysql: storing what we know makes life easier

git at icinga.org git at icinga.org
Wed Feb 24 12:21:25 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: 92f54dbae28fd944676bfb923a088e6560a204ab
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=92f54dbae28fd944676bfb923a088e6560a204ab

Author: Thomas Gelf <thomas at gelf.net>
Date:   Wed Feb 24 12:20:48 2016 +0100

schema/mysql: storing what we know makes life easier

---

 library/Director/Objects/SyncRun.php   |    2 +-
 schema/mysql-migrations/upgrade_69.sql |    9 +++++++++
 schema/mysql.sql                       |    4 ++--
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/library/Director/Objects/SyncRun.php b/library/Director/Objects/SyncRun.php
index f866998..44c09ac 100644
--- a/library/Director/Objects/SyncRun.php
+++ b/library/Director/Objects/SyncRun.php
@@ -21,7 +21,7 @@ class SyncRun extends DbObject
         'objects_created'        => null,
         'objects_deleted'        => null,
         'objects_modified'       => null,
-        'first_related_activity' => null,
+        'last_former_activity'   => null,
         'last_related_activity'  => null,
     );
 
diff --git a/schema/mysql-migrations/upgrade_69.sql b/schema/mysql-migrations/upgrade_69.sql
new file mode 100644
index 0000000..7bf764e
--- /dev/null
+++ b/schema/mysql-migrations/upgrade_69.sql
@@ -0,0 +1,9 @@
+ALTER TABLE sync_run
+  DROP COLUMN first_related_activity,
+  ADD COLUMN last_former_activity VARBINARY(20) DEFAULT NULL AFTER objects_modified;
+
+INSERT INTO director_schema_migration
+  SET migration_time = NOW(),
+      schema_version = 69;
+
+
diff --git a/schema/mysql.sql b/schema/mysql.sql
index 90da630..1b663c4 100644
--- a/schema/mysql.sql
+++ b/schema/mysql.sql
@@ -1064,7 +1064,7 @@ CREATE TABLE sync_run (
   objects_deleted INT(10) UNSIGNED DEFAULT 0,
   objects_created INT(10) UNSIGNED DEFAULT 0,
   objects_modified INT(10) UNSIGNED DEFAULT 0,
-  first_related_activity VARBINARY(20) DEFAULT NULL,
+  last_former_activity VARBINARY(20) DEFAULT NULL,
   last_related_activity VARBINARY(20) DEFAULT NULL,
   PRIMARY KEY (id),
   CONSTRAINT sync_run_rule
@@ -1076,5 +1076,5 @@ CREATE TABLE sync_run (
 
 INSERT INTO director_schema_migration
   SET migration_time = NOW(),
-      schema_version = 68
+      schema_version = 69
 



More information about the icinga-checkins mailing list