Generator-jhipster: Change default database to Postgres

Created on 8 May 2020  路  10Comments  路  Source: jhipster/generator-jhipster

Overview of the feature request

As mentioned in #10958 we could use Postgres as our default database.

Motivation for or Use Case

The point must have been discussed without my knowledge to be in the v7 roadmap, so I'm making this ticket to have a place to talk about it.

Related issues or PR

I've already made some shallow stuff on #11724.

  • [x] Checking this box is mandatory (this is just to show you read everything)
$$ bug-bounty $$ $200 area database v7

All 10 comments

As @pascalgrimaud pointed out, changing this would require to:

  • change all default config in CI to use and test more PostgreSQL
  • do the same thing in jhipster-daily-builds
  • change the behavior in jhipster-online
  • do the change in all other blueprint backend (kotlin, nodejs, quarkus, etc.)

And update what the JDL parsing system outputs to take that into account.

@mshima You mean "postgresql >= 10: use identity columns for autoincrement"?

@mshima Yes I agree, since I migrate to liquibase 3.10.1 (and PR is ready for 4.0.0), we can now switch to autoincrement.

Will you make the PR or do you want I take care of it?

@DanielFran posted to keep note, pretty busy in the generator refactoring.
Feel free to work on it.

Why would you want to use autoincrement for Postgres?
As far as I understand, the point in this article still stands: https://vladmihalcea.com/postgresql-serial-column-hibernate-identity/
The new identity feature in Postgres is just a more convenient and cleaner way to manage the underlying sequence used by Postgres, but this is still problematic with JPA/Hibernate.

@murdos The only changes expected is to use autoincrement in liquibase side that define the "GENERATED AS IDENTITY" that still uses a sequence

Closing this as it's done

Was this page helpful?
0 / 5 - 0 ratings