Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate persistence of inherited contexts #111

Open
fbiville opened this issue Jan 19, 2022 · 0 comments
Open

Investigate persistence of inherited contexts #111

fbiville opened this issue Jan 19, 2022 · 0 comments

Comments

@fbiville
Copy link
Collaborator

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants