diff --git a/config/flags.yaml b/config/flags.yaml index 0b76ebf90..fba207a4f 100644 --- a/config/flags.yaml +++ b/config/flags.yaml @@ -107,6 +107,10 @@ modifications: value: "false" override: true + - name: "query_callable_mappings_path" + value: "/etc/memgraph/apoc_compatibility_mappings.json" + override: true + undocumented: - "flag_file" - "also_log_to_stderr" diff --git a/config/mappings.json b/config/mappings.json new file mode 100644 index 000000000..44d497cd1 --- /dev/null +++ b/config/mappings.json @@ -0,0 +1,27 @@ +{ + "dbms.components": "mgps.components", + "apoc.util.validate": "mgps.validate", + "db.schema.nodeTypeProperties":"schema.node_type_properties", + "db.schema.relTypeProperties":"schema.rel_type_properties", + "apoc.coll.contains": "collections.contains", + "apoc.coll.partition": "collections.partition", + "apoc.coll.toSet": "collections.to_set", + "apoc.coll.unionAll": "collections.unionAll", + "apoc.coll.removeAll": "collections.remove_all", + "apoc.coll.union": "collections.union", + "apoc.coll.sum": "collections.sum", + "apoc.coll.pairs": "collections.pairs", + "apoc.map.fromLists": "map.from_lists", + "apoc.map.removeKeys": "map.remove_keys", + "apoc.map.merge": "map.merge", + "apoc.create.nodes": "create.nodes", + "apoc.create.removeProperties": "create.remove_properties", + "apoc.create.node": "create.node", + "apoc.create.removeLabel": "create.remove_label", + "apoc.refactor.invert": "refactor.invert", + "apoc.refactor.cloneNode": "refactor.clone_node", + "apoc.refactor.cloneSubgraph": "refactor.clone_subgraph", + "apoc.refactor.cloneSubgraphFromPath": "refactor.clone_subgraph_from_path", + "apoc.label.exists": "label.exists" + +} diff --git a/release/debian/conffiles b/release/debian/conffiles index 0b3e130ef..125dfed84 100644 --- a/release/debian/conffiles +++ b/release/debian/conffiles @@ -1,3 +1,4 @@ /etc/memgraph/memgraph.conf +/etc/memgraph/apoc_compatibility_mappings.json /etc/memgraph/auth_module/ldap.example.yaml /etc/logrotate.d/memgraph diff --git a/release/rpm/memgraph.spec.in b/release/rpm/memgraph.spec.in index d663ce953..f0ce3044e 100644 --- a/release/rpm/memgraph.spec.in +++ b/release/rpm/memgraph.spec.in @@ -132,6 +132,7 @@ echo "Don't forget to switch to the 'memgraph' user to use Memgraph" || exit 1 # Override CPACK_RPM_ABSOLUTE_INSTALL_FILES with our %config(noreplace), cpack # uses plain %config. %config(noreplace) "/etc/memgraph/memgraph.conf" +%config(noreplace) "/etc/memgraph/apoc_compatibility_mappings.json" %config(noreplace) "/etc/memgraph/auth_module/ldap.example.yaml" %config(noreplace) "/etc/logrotate.d/memgraph" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa35ccfbc..833072ec5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,7 @@ if(lower_build_type STREQUAL "release") COMMENT "Stripping symbols and sections from memgraph") endif() -# Generate the configuration file. +# Generate the configuration file under the build directory. add_custom_command(TARGET memgraph POST_BUILD COMMAND ${CMAKE_SOURCE_DIR}/config/generate.py ${CMAKE_BINARY_DIR}/memgraph @@ -80,6 +80,11 @@ add_custom_command(TARGET memgraph POST_BUILD ${CMAKE_SOURCE_DIR}/config/flags.yaml BYPRODUCTS ${CMAKE_BINARY_DIR}/config/memgraph.conf COMMENT "Generating memgraph configuration file") +# Copy the mappings file to the build directory. +add_custom_command(TARGET memgraph POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_SOURCE_DIR}/config/mappings.json + ${CMAKE_BINARY_DIR}/config/apoc_compatibility_mappings.json) # Everything here is under "memgraph" install component. set(CMAKE_INSTALL_DEFAULT_COMPONENT_NAME "memgraph") @@ -115,6 +120,9 @@ install(FILES ${CMAKE_SOURCE_DIR}/include/mgp.hpp # Install the config file (must use absolute path). install(FILES ${CMAKE_BINARY_DIR}/config/memgraph.conf DESTINATION /etc/memgraph RENAME memgraph.conf) +# Install the mappings file (must use absolute path). +install(FILES ${CMAKE_BINARY_DIR}/config/apoc_compatibility_mappings.json + DESTINATION /etc/memgraph RENAME apoc_compatibility_mappings.json) # Install logrotate configuration (must use absolute path). install(FILES ${CMAKE_SOURCE_DIR}/release/logrotate.conf