[icinga-checkins] icinga.org: icingaweb2-module-director/feature/ show-deployment-endpoint-11841: schema/mysql: prepare a migration for this feature

git at icinga.org git at icinga.org
Tue Oct 25 00:05:18 CEST 2016


Module: icingaweb2-module-director
Branch: feature/show-deployment-endpoint-11841
Commit: fb5f0bb9f9a1a85efab29d494cb9a9d852ba779f
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=fb5f0bb9f9a1a85efab29d494cb9a9d852ba779f

Author: Thomas Gelf <thomas at gelf.net>
Date:   Mon Oct 24 21:38:47 2016 +0000

schema/mysql: prepare a migration for this feature

---

 schema/mysql-migrations/upgrade_rename-deployment-endpoint.sql |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/schema/mysql-migrations/upgrade_rename-deployment-endpoint.sql b/schema/mysql-migrations/upgrade_rename-deployment-endpoint.sql
new file mode 100644
index 0000000..94a5b59
--- /dev/null
+++ b/schema/mysql-migrations/upgrade_rename-deployment-endpoint.sql
@@ -0,0 +1,8 @@
+UPDATE director_deployment_log dl 
+  JOIN icinga_endpoint e ON dl.peer_identity = e.host
+   SET dl.peer_identity = e.object_name
+ WHERE dl.peer_identity != e.object_name;
+
+INSERT INTO director_schema_migration
+  (schema_version, migration_time)
+  VALUES (XXX, NOW());



More information about the icinga-checkins mailing list