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

SQLite generated columns #6135

Conversation

bastuijnman
Copy link

Q A
Type improvement
Fixed issues

Summary

The current implementation for SQLite will not list any generated columns due to them being retrieved through the table_info pragma statement. This causes problems for situations where DBAL is used for schema changes (for example Laravel) where a generated field will get dropped whenever a column gets changed (Laravel uses DBAL for this specific case).

table_xinfo returns data the same way but does include the generated columns.

@derrabus
Copy link
Member

Your changes break our test suite apparently.

DBAL currently does not offer any abstraction for generated columns. I don't think it's wise to list them if DBAL doesn't know how to handle them. I will at least need a couple of tests that show me that schema introspection and comparison is not broken by generated columns.

@bastuijnman
Copy link
Author

Indeed I did some further digging and while for the most part this works to retain columns they are not marked as such and will just be listed as regular columns later on (resulting in unexpected schema changes once again).

I'll try to find some time to add proper support for generative columns.

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 Jan 10, 2024
Copy link

This pull request was closed due to inactivity.

@github-actions github-actions bot closed this Jan 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants