-
Notifications
You must be signed in to change notification settings - Fork 564
Rails 6.1: change schema dumper condition to only dump explicit default for non identity integers #902
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
Merged
wpolicarpo
merged 13 commits into
rails-sqlserver:main
from
yellowspot:issues/yellowspot/rails-6-1/coerce-test-to-match-pk-default-and-binding-syntax
Apr 28, 2021
Merged
Conversation
This file contains hidden or 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
wpolicarpo
reviewed
Apr 21, 2021
…atch-pk-default-and-binding-syntax
This reverts commit 63eddd4.
…atch-pk-default-and-binding-syntax
seems this was missing when primary_key changed from integer to bigint (rails-sqlserver@620baf2#diff-86264ef1995b0800604b26d64ede427e8a3ed59347993bfb409c596e83f4b86f)
…es this Absctract SchemaDefinition sets primary_key option (https://github.com/rails/rails/blob/v6.1.0/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#L234). There is no point in doing this
…umns that return true to is_primary?
…ot have explicit default
wpolicarpo
reviewed
Apr 28, 2021
Member
wpolicarpo
left a comment
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.
Can you also rebase your branch?
…atch-pk-default-and-binding-syntax
lavika
pushed a commit
to lavika/activerecord-sqlserver-adapter
that referenced
this pull request
Sep 26, 2023
…lt for non identity integers (rails-sqlserver#902) * coerse test to change binding syntax to @n * add default option to pk dump * Revert "coerse test to change binding syntax to @n" This reverts commit 63eddd4. * remove test coercion * set primary_key_nonclustered type to bigint seems this was missing when primary_key changed from integer to bigint (rails-sqlserver@620baf2#diff-86264ef1995b0800604b26d64ede427e8a3ed59347993bfb409c596e83f4b86f) * remove redundat set of primary_key option. AbstractAdapter already does this Absctract SchemaDefinition sets primary_key option (https://github.com/rails/rails/blob/v6.1.0/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb#L234). There is no point in doing this * remove unnecesary primary check. default_primary_key is called on columns that return true to is_primary? * rewrite 'explicit_primary_key_default?'. String primary keys should not have explicit default * specs about primary keys * fix typo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR fixes: