Permalink
Browse files

Re-setting meta.syncable trigger

  • Loading branch information...
1 parent 1c8dc98 commit 494a99056a9a68777565b3d2a0c15361e814491d @ghecquet ghecquet committed Sep 26, 2016
Showing with 9 additions and 1 deletion.
  1. +1 −1 core/src/plugins/meta.syncable/create.mysql
  2. +8 −0 dist/php/6.5.2.mysql
@@ -35,4 +35,4 @@ DROP TRIGGER IF EXISTS `LOG_UPDATE`;
CREATE TRIGGER `LOG_UPDATE` AFTER UPDATE ON `ajxp_index`
FOR EACH ROW INSERT INTO ajxp_changes (repository_identifier, node_id,source,target,type)
- VALUES (new.repository_identifier, new.node_id, old.node_path, new.node_path, CASE old.node_path = new.node_path WHEN true THEN 'content' ELSE 'path' END);
+ VALUES (new.repository_identifier, new.node_id, old.node_path, new.node_path, CASE old.node_path COLLATE utf8_bin = new.node_path COLLATE utf8_bin WHEN true THEN 'content' ELSE 'path' END);
@@ -1,3 +1,4 @@
+-- Creating table ajxp_tasks
DROP TABLE IF EXISTS ajxp_tasks;
CREATE TABLE IF NOT EXISTS ajxp_tasks (
@@ -28,3 +29,10 @@ CREATE INDEX ajxp_task_status_idx ON ajxp_tasks (status);
CREATE INDEX ajxp_task_type ON ajxp_tasks (type);
CREATE INDEX ajxp_task_schedule ON ajxp_tasks (schedule);
CREATE INDEX ajxp_task_nodes_idx ON ajxp_tasks (nodes);
+
+-- Rebuilding ajxp_changes trigger
+DROP TRIGGER IF EXISTS `LOG_UPDATE`;
+
+CREATE TRIGGER `LOG_UPDATE` AFTER UPDATE ON `ajxp_index`
+FOR EACH ROW INSERT INTO ajxp_changes (repository_identifier, node_id,source,target,type)
+ VALUES (new.repository_identifier, new.node_id, old.node_path, new.node_path, CASE old.node_path COLLATE utf8_bin = new.node_path COLLATE utf8_bin WHEN true THEN 'content' ELSE 'path' END);

0 comments on commit 494a990

Please sign in to comment.