I’ve started writing a Java Spring Boot application that connects to Neo4j database. Nodes, relationships, indexes and constraints are defined by using Neo4j ogm annotations.
Now I have come to the part where I need to implement triggers.
I saw there are apoc triggers and I’ve tested it a little.
However, it is not clear to me whether there is a way to create or modify triggers on the test graph, and then to apply these trigger changes to the production graph?
Maybe it would be even better if there was a possibility to maintain triggers through application code, like it is possible with Liquidbase and relational dbs.
I found Liquidgraph which is a project inspired by Liquidbase. I created changelog which has changesets with queries that add apoc triggers every time the state of the graph differs from the state defined in the changelog. For now, it looks like everything is working fine.