-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata #23025
Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata #23025
Conversation
r? @arthurnn (@rails-bot has picked a reviewer for you, use r? to override) |
3e54e56
to
d3d9450
Compare
I'm leaning towards renaming it |
Thanks for the suggestion. As long as the table name length is shorter than 26 byte considering prefix and suffix support which requires 4 bytes. I'm fine with |
d3d9450
to
d327414
Compare
I've been thinking about which Looks like This pull request is important for Oracle since it's identifier length is limited to 30 bytes (Yes, it is way short, but it is what it is so far..), and there are some use cases who develops their applications using non Oracle database and migrate it to Oracle at production environment. It would be appreciated this pull request reviewed. |
This will need to check for existing tables with the old name and rename them if they exist |
@sgrif Thanks for the review. I have a question. As far as I understand |
Given how easy it is to rename, I think it's worth it for people who are On Tue, Jan 26, 2016, 3:07 PM Yasuo Honda notifications@github.com wrote:
|
Let me try to implement renaming and update this pull request. |
d327414
to
adebed1
Compare
Updated this pull request to include rename |
@@ -34,8 +42,16 @@ def table_exists? | |||
ActiveSupport::Deprecation.silence { connection.table_exists?(table_name) } | |||
end | |||
|
|||
def original_table_exists? |
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 we add a note to remove this method in 5.1?
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.
Sure. Let me add one line comment in this method.
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.
Comment added to mention that this method will be removed in Rails 5.1
adebed1
to
bff2ba2
Compare
Can you change the table name to be |
bff2ba2
to
543e07b
Compare
Thanks for the review and advice. Updated to use |
…data to support Oracle database which only supports 30 byte identifier length
for those who already migrated to Rails 5.0.0 beta
543e07b
to
407e0ab
Compare
…e_name_less_than_30_byte Shorten ActiveRecord::InternalMetadata.table_name to ar_internal_metadata
This pull request addresses the following error when tested with Oracle enhanced adapter.
It changes ActiveRecord::InternalMetadata.table_name to ar_internal_metadatas to support Oracle database which only supports 30 byte identifier length.
I think "ar_internal_metadatas" can explain what it intends.