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

[#1383] 🆕 Ability to disable database evolutions on a datasource basis #1384

Conversation

holajsh
Copy link
Contributor

@holajsh holajsh commented Feb 15, 2022

Fixes

Fixes #1383

Purpose

Add support for a new configuration parameter to allow disabling database evolutions per database.

References

#1383

@holajsh holajsh changed the title [#1383] 🆕 bility to disable database evolutions on a datasou… [#1383] 🆕 Ability to disable database evolutions on a datasource basis Feb 15, 2022
@@ -392,6 +392,10 @@ private boolean isDisabled() {
return "false".equals(Play.configuration.getProperty("evolutions.enabled", "true"));
}

private static boolean isDatabaseEvolutionDisabled(String dbName) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are doing double-negotiation here: "false" -> "Disabled" -> "!Disabled". The code may be slightly simplified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course, in fact I just kept the existing "style" to stay coherent with other methods :D
Can be changed if really required ;)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure. Probably not such important. :)

@asolntsev asolntsev self-requested a review February 15, 2022 10:18
@xael-fry xael-fry self-requested a review February 15, 2022 12:19
Copy link
Member

@xael-fry xael-fry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@holajsh
Copy link
Contributor Author

holajsh commented Feb 15, 2022

@holajsh can you update the documentation https://github.com/playframework/play1/blob/master/documentation/manual/evolutions.textile ? Thanks

Sure, I have pushed something but I'm not really sure how to check it will display properly...

@xael-fry xael-fry merged commit 1a54ebe into playframework:master Feb 21, 2022
@xael-fry xael-fry added this to the 1.7.0 milestone Feb 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ability to disable database evolutions on a datasource basis
3 participants