Open roygopal opened 1 year ago
Hey i am facing this issue as well. is there a fix to this?
Currently on:
@Physium For now, we solved it by applying monkey patches to our application. Added below patch and loaded this in config/initializers. See the attached screenshot. It worked for us.
@roygopal thanks for sharing! Is there a reason why you patch here and not at this gem adapter level?
@roygopal thanks for sharing! Is there a reason why you patch here and not at this gem adapter level?
No particular reason. Its just that in our app it was blocking other priority changes and due to time constraint we patched in our app.
Apologies, what i meant was that i notice that the code is to override TableDefinitation class which seems like an ActiveRecord thing. Shouldn't the patch be targeting some class under the gem adapter layer? I dont know enough about this adapter and the underlyng of how it work hence would just like to understand how this patch works.
Steps to reproduce
In schema.rb/oracle_schema.rb file the syntax that is generated for default id column is in hash notation. It happens because of
id: { type: :string, limit: 191 }
syntax in oracle_schema.rb. When we change manually it toid: :string, limit: 36
then schema load passes. Generated migration (schema.rb/oracle_schema.rb)file has syntax as belowcreate_table "settings", primary_key: "name", id: { type: :string, limit: 191 }, force: :cascade do |t|
Expected behavior
db:schema:load should pass.
Actual behavior
On db:schema:load, it fails with error
NoMethodError: undefined method
to_sym' for {:type=>:string, :limit=>36}:Hash`System configuration
Rails version: 6.1
Oracle enhanced adapter version: 6.1.0
Ruby version: >=3.0
Oracle Database version: XE