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

feat: Support for Environment to flyway service #245

Merged
merged 1 commit into from
May 12, 2022

Conversation

aVolpe
Copy link
Contributor

@aVolpe aVolpe commented May 12, 2022

The FlywayService qbean is helpful to integrate flyway into the life cycle
of the server.

Normally we can migrate the schema automatically in development or local
environments, but in production normally we use a database user with
limited permissions (for example the user can't perform DDL -CREATE,
DROP-).

With this commit you can specify a property as the child of the
tag:

<flyway class="org.jpos.flyway.FlywayService" logger="Q2">
    <property name="out-of-order" value="true" />
    <commands>${flyway_commands:validate}</commands>
</flyway>

This will allow setting an environment variable to local/dev environments
to perform migrations automatically (flyway_commands=migrate).

Signed-off-by: Arturo Volpe arturovolpe@gmail.com

The FlywayService qbean is helpful to integrate flyway into the life cycle
of the server.

Normally we can migrate the schema automatically in development or local
environments, but in production normally we use a database user with
limited permissions (for example the user can't perform DDL -CREATE,
DROP-).

With this commit you can specify a property as the child of the
<command> tag:

```xml
<flyway class="org.jpos.flyway.FlywayService" logger="Q2">
    <property name="out-of-order" value="true" />
    <commands>${flyway_commands:validate}</commands>
</flyway>
```

This will allow setting an environment variable to local/dev environments
to perform migrations automatically (flyway_commands=migrate).

Signed-off-by: Arturo Volpe <arturovolpe@gmail.com>
@ar ar merged commit e534a57 into jpos:master May 12, 2022
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

Successfully merging this pull request may close these issues.

2 participants