You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling this method on a model with a table name in a different schema now only gives nil. Whereas in version 5.2.x, it would correctly fetch the table's comment.
Create a model (w/ migration) that lives in a non-standard DB schema.
# app/models/my_schema/my_model.rbmoduleMySchemaclassMyModel < ApplicationRecord# which inherits from ActiveRecord::Baseself.table_name='my_schema.my_model'# intentionally using singular name# other stuff...endend# db/migrate/01_create_my_schema_my_model.rbclassCreateMySchemaMyModel < ActiveRecord::Migration[6.1]defchangecreate_table'my_schema.my_model',comment: "This model has a comment"do |t|
# Some column definitions...endendend
then migrate
Open rails console, then call ApplicationRecord.connection.table_comment(MySchema::MyModel.table_name)
Calling this method on a model with a table name in a different schema now only gives
nil
. Whereas in version 5.2.x, it would correctly fetch the table's comment.Steps to reproduce
ApplicationRecord.connection.table_comment(MySchema::MyModel.table_name)
Expected behavior
It should return the string
"This model has a comment"
with all versions of the gemActual behavior
nil
with the 6.x version of the gem"This model has a comment"
with the 5.2.x version of the gemSystem configuration
Rails version: 6.1.5 / 5.2.3 for these examples
Oracle enhanced adapter version: 6.1.4 / 5.2.3 for these examples
Ruby version: 2.6.6 / 2.7.5
Oracle Database version: Oracle Database 19c Enterprise Edition - 19.14.0.0.0
The text was updated successfully, but these errors were encountered: