-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
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: |
There was a problem hiding this comment.
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
"?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
- Identifier generation strategies (
AUTO
,IDENTITY
,SEQUENCE
, etc.) - What SQL object they map to (a database sequence, an auto-increment column, an identity column).
- 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:
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
* 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)
* 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)
Closes #11248