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

Add Postgres native identity column support #5257

Closed
wants to merge 1 commit into from

Conversation

adrienbrault
Copy link
Contributor

Q A
Type feature
Fixed issues #3619

Summary

return true;
return false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm guessing that this isn't fine, and is a BC break?

Copy link
Member

@morozov morozov Feb 7, 2022

Choose a reason for hiding this comment

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

A BC break will happen when someone upgrades to the version of the DBAL that uses IDENTITY instead of sequences and has their sequence values reset. See #4744 (comment) for more details.

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 this can be handled in the \Doctrine\DBAL\Schema\PostgreSqlSchemaManager, when we detect going from a non-native identity autoinc column, to a native one?

Copy link
Member

@morozov morozov Feb 9, 2022

Choose a reason for hiding this comment

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

I see two ways here:

  1. We do it in the schema manager as you suggested. This way, the upgrade process will be implemented in the library, so the change won't be breaking and could be accepted in a minor release.
  2. We do it via documentation and a separate upgrade tool. This way, it will be a breaking change.

Both approaches have their pros and cons. BTW, apparently, I prototyped the same thing back in August: 3.4.x...morozov:pgsql-identity.

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label May 13, 2022
@morozov
Copy link
Member

morozov commented May 17, 2022

Closing in favor of #5396.

@morozov morozov closed this May 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants