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

Update Evolutions.scala #11345

Merged
merged 5 commits into from Sep 16, 2022
Merged

Update Evolutions.scala #11345

merged 5 commits into from Sep 16, 2022

Conversation

BlankFX
Copy link
Contributor

@BlankFX BlankFX commented Jul 4, 2022

HSQL does not support the data type "text". Therefore it needs an additional statement, to create the initial play_evolutions table.
Steps:

  1. Create an additional pattern 'HsqlJdbcUrl' für HSQL in Evolutions.scala
  2. Provide a custom SQL script for 'play_evolutions' table creation in EvolutionsApi.scala

Affected files:
play.api.db.evolutions.Evolutions.scala
play.api.db.evolutions.EvolutionsApi.scala

Pull Request Checklist

Helpful things

Fixes

Scala Play Evolutions "play_evolutions" table creation.

Purpose

I allows the use of Play Evolutions with a HSQL Database for Scala Play.

Background Context

I used Play Evolutions with HSQL local database server

References

Are there any relevant issues / PRs / mailing lists discussions?

HSQL does not support the data type "text". Therefore it needs an additional statement, to create the initial play_evolutions table.
Steps:
1. Create an additional pattern 'HsqlJdbcUrl' für HSQL in Evolutions.scala
2. Provide a custom SQL script for 'play_evolutions' table creation in EvolutionsApi.scala

Affected files:
play.api.db.evolutions.Evolutions.scala
play.api.db.evolutions.EvolutionsApi.scala
@lightbend-cla-validator
Copy link

Hi @BlankFX,

Thank you for your contribution! We really value the time you've taken to put this together.

Before we proceed with reviewing this pull request, please sign the Lightbend Contributors License Agreement:

https://www.lightbend.com/contribute/cla

@mkurz
Copy link
Member

mkurz commented Jul 8, 2022

@BlankFX thanks! However it seems your pull request still is incomplete. Are you planning to work on it?
Also, as a workaround you could just enable mysql mode in the jdbc url: https://stackoverflow.com/a/12290408/810109

This commit is linked to Pull-Request Update Evolutions.scala playframework#11345.
@BlankFX
Copy link
Contributor Author

BlankFX commented Jul 18, 2022

@mkurz

I added the remaining code lines in "EvolutionsApi.scala".

@mkurz
Copy link
Member

mkurz commented Aug 8, 2022

@BlankFX You need to run scalafmtAll within sbt to correctly format your sources. After that please push your changes again, thanks!

@mkurz
Copy link
Member

mkurz commented Aug 8, 2022

@BlankFX hmm.. there is still a formatting issue. Can you check again?

@BlankFX
Copy link
Contributor Author

BlankFX commented Aug 9, 2022

@mkurz Na endlich! Finally it worked. THX :-)

Copy link
Member

@mkurz mkurz left a comment

Choose a reason for hiding this comment

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

Thanks @BlankFX, I will backport this for the next 2.8.x release as well.

@mkurz mkurz merged commit 5cdb6ae into playframework:main Sep 16, 2022
@mkurz
Copy link
Member

mkurz commented Sep 16, 2022

@Mergifyio backport 2.8.x

mergify bot pushed a commit that referenced this pull request Sep 16, 2022
This commit is linked to Pull-Request Update Evolutions.scala #11345.

(cherry picked from commit ff3ffdb)
@mergify
Copy link
Contributor

mergify bot commented Sep 16, 2022

backport 2.8.x

✅ Backports have been created

mergify bot added a commit that referenced this pull request Sep 19, 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.

None yet

3 participants