In Play Framework, I use evolutions to manage the database migration. I also use the combination of H2 for dev and test, and Postgresql for production. However, H2 seems to UPPERCASE all the table names and column names, and Postgresql does exactly the opposite.
Is there a way to make these 2 databases play nice together?
Here is the excerpt from my application.conf:
db.default.driver = org.h2.Driver
db.default.url = "jdbc:h2:mem:play;MODE=PostgreSQL"
db.default.user = ""
db.default.password = ""
# db.default: {
# driver = org.postgresql.Driver
# url = "jdbc:postgresql://127.0.0.1/khanguyen"
# user = khanguyen
# password = ""
# }
I use Slick 2.1.0
My previous answer was wrong. I did not know why it worked for a brief moment, on a machine running Ubuntu.
For case sensitive database system such as H2, or Postgresql, if you want to keep the case of character, then you should use double quotes surrounding all your table and column names.
The evolutions will look like this:
Then both H2 and Postgres will create this table with lowercase chars. Or:
Then both H2 and Postgres will create this table with UPPERCASE chars.