Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ActiveRecord::SchemaMigration
has no primary key.
Before this patch, using `ActiveRecord::Base.primary_key_prefix_type` with `:table_name_with_underscore` would change the `SchemaMigration` model to have a primary key. This resulted in broken queries for PG because it tried to return the inserted PK (which does not exist). Closes #15051. Closes #15419.
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8fa8b71
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.
Hey Senny, can you take a look at #22976 any problems you see with specifying a primary key of "version" for SchemaMigration?
8fa8b71
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.
@schneems using
version
as primary key seems fine 👍