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

PostgreSQL: Npgsql Version 6 timestamp Breaking Change issue #34

Closed
AGiorgetti opened this issue Nov 12, 2021 · 1 comment
Closed

PostgreSQL: Npgsql Version 6 timestamp Breaking Change issue #34

AGiorgetti opened this issue Nov 12, 2021 · 1 comment
Assignees
Labels

Comments

@AGiorgetti
Copy link
Member

Due to the Breaking change introduced by version 6 of the driver dealing with timestamp (see the release notes at: https://www.npgsql.org/efcore/release-notes/6.0.html#timestamp-rationalization-and-improvements) there's an error while persisting the commits to the database.

The 'ColumnStamp' colum is of type 'timestamp' while it should be 'timestamptz'.

To use this version of the driver you manually need to update the table schema following the guidelines provided in the driver release notes and breaking changes.

The PostgreSQL driver should be updates in order to generate the correct schema when version 6 of the driver is used.

A possible solution is introduce a custom PostgreSQL dialect.

@AGiorgetti AGiorgetti self-assigned this Nov 12, 2021
@AGiorgetti AGiorgetti added the bug label Nov 12, 2021
@AGiorgetti
Copy link
Member Author

AGiorgetti commented Nov 12, 2021

A workaround is to disable the new driver behavior:

AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant