liquibase-neo4j icon indicating copy to clipboard operation
liquibase-neo4j copied to clipboard

Investigate persistence of inherited contexts

Open fbiville opened this issue 3 years ago • 0 comments

The behavior of Liquibase core for RDBMS is to also persist the contexts inherited from the changelog(s) including that change set as shown by the code below of liquibase.sqlgenerator.core.MarkChangeSetRanGenerator#buildFullContext:

private String buildFullContext(ChangeSet changeSet) {
        StringBuilder contextExpression = new StringBuilder();
        boolean notFirstContext = false;
        for (ContextExpression inheritableContext : changeSet.getInheritableContexts()) {
            appendContext(contextExpression, inheritableContext.toString(), notFirstContext);
            notFirstContext = true;
        }
        ContextExpression changeSetContext = changeSet.getContexts();
        if ((changeSetContext != null) && !changeSetContext.isEmpty()) {
            appendContext(contextExpression, changeSetContext.toString(), notFirstContext);
        }
        return contextExpression.toString();
    }

The Neo4j plugin does not persist inherited contexts at the moment.

I'm not flagging this as a bug yet, since there is an ongoing discussion about that contexts should be persisted in the database (declared on file vs specified at runtime).

fbiville avatar Jan 19 '22 16:01 fbiville