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

[Documentation] Adding link to Postgres upgrade article #11257

Merged
merged 3 commits into from
Feb 15, 2024

Conversation

ThomasLandauer
Copy link
Contributor

Closes #11248

jwage
jwage previously approved these changes Feb 13, 2024
UPGRADE.md Outdated

instead of `SEQUENCE`.
* If you want to upgrade your existing tables to `IDENTITY`, see [Migration to identity columns on PostgreSQL](https://www.doctrine-project.org/projects/doctrine-dbal/en/4.0/how-to/postgresql-identity-migration.html)
* If you want to keep `SEQUENCE` or `SERIAL`, then configure the ORM this way:
Copy link
Member

Choose a reason for hiding this comment

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

🤔 I understand what you mean by "keeping SEQUENCE", but what do you mean by "keeping SERIAL"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe it's not clear to everybody that types SEQUENCE and SERIAL are the same (at least I didn't know that). I now added "type" - I guess that's what you mean, right?

Copy link
Member

Choose a reason for hiding this comment

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

I think there are 3 concepts:

  1. Identifier generation strategies (AUTO, IDENTITY, SEQUENCE, etc.)
  2. What SQL object they map to (a database sequence, an auto-increment column, an identity column).
  3. The DDL used to create these objects (SERIAL, which is no longer used with ORM 3 and DBAL 4, GENERATED ALWAYS AS IDENTITY, etc.)

I think people are very confused about this, so let's try hard not to increase the confusion, by not using these 3 concepts interchangeably.

* If you want to upgrade your existing tables to identity columns, you will need
to follow [migration to identity columns on PostgreSQL](https://www.doctrine-project.org/projects/doctrine-dbal/en/4.0/how-to/postgresql-identity-migration.html)
* If you want to keep using SQL sequences, you need to configure the ORM this way:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, take a look now.

Copy link
Member

Choose a reason for hiding this comment

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

I did, and approved 👍
Just keeping that conversation open in case other maintainers disagree with my suggestion.

@SenseException SenseException merged commit 3918dcf into doctrine:3.0.x Feb 15, 2024
@ThomasLandauer ThomasLandauer deleted the patch-10 branch February 15, 2024 21:43
derrabus added a commit to derrabus/orm that referenced this pull request Feb 21, 2024
* 3.0.x:
  Remove broken assertion from DateAddFunction and DateSubFunction (doctrine#11243)
  Remove unused trait
  [Documentation] Adding link to Postgres upgrade article (doctrine#11257)
  fix: support array-type arg in QB variadic calls (doctrine#11242)
derrabus added a commit to derrabus/orm that referenced this pull request Feb 21, 2024
* 3.1.x:
  Fix Static Analysis folder reference (doctrine#11281)
  Remove broken assertion from DateAddFunction and DateSubFunction (doctrine#11243)
  Account for inversedBy being a non-falsy-string or null
  Improve static analysis on AttachEntityListenersListener
  docs: recommend safer way to disable logging (doctrine#11269)
  Remove unused baseline entries
  Treat '0' as a legitimate trim char
  Add type field mapper documentation to the sidebar
  Mark document as orphan
  Use correction sectionauthor syntax
  Remove unused trait
  [Documentation] Adding link to Postgres upgrade article (doctrine#11257)
  Validate more variadic parameters (doctrine#11261)
  Throw if a variadic parameter contains unexpected named arguments (doctrine#11260)
  Make docs valid according to guides 0.3.3 (doctrine#11252)
  fix: support array-type arg in QB variadic calls (doctrine#11242)
@derrabus derrabus added this to the 3.0.1 milestone Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants