Skip to content

Fix copying virtual columns when altering a table in sqlite3#51531

Merged
yahonda merged 1 commit into
rails:mainfrom
fatkodima:fix-sqlite-copy-virtual-columns
Apr 10, 2024
Merged

Fix copying virtual columns when altering a table in sqlite3#51531
yahonda merged 1 commit into
rails:mainfrom
fatkodima:fix-sqlite-copy-virtual-columns

Conversation

@fatkodima
Copy link
Copy Markdown
Member

Fixes #51522.

When rails alters a sqlite table, it creates a new table and copies the structure and data from the old one to it.
The problem is that virtual columns are incorrectly copied (copied as classic columns). This PR fixes that.

@yahonda yahonda merged commit 81cbca7 into rails:main Apr 10, 2024
@fatkodima fatkodima deleted the fix-sqlite-copy-virtual-columns branch April 10, 2024 23:20
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.

bin/rails db:prepare breaks virtual/generated columns in db/schema.rb

2 participants