Dump schema in Oracle database using db: schema: dump using rake

Does anyone know of any specific DSL implementations used to import legacy Oracle database schemas. I tried just running db: schema: dump on my existing db I want a port for a new ruby ​​application. However, the rake dies about halfway with some kind of mistake. It just locks up. I started looking for a better way to handle this and found examples of how to override some things for SQLServer, but not so much for Oracle.

I basically want to pull out the circuit and create a scaffold and model from it.

Is there an easier way to do this or will I have to reinvent the wheel?

+3
source share
3

: ActiveRecord Oracle oracle_enhanced (http://github.com/rsim/oracle-enhanced)? oracle_enhanced, .

Rails :

rake db:schema:dump

schema.rb Rails . Oracle ( database.yml) Oracle Rails. , Rails, . Rails, . , oracle_enhanced Oracle ( ).

rake db:structure:dump

SQL (, db/development_structure.sql), Oracle ( ). , Oracle. , ActiveRecord , , . Rails- , SQL.

Rails - Oracle, - database.yml ActiveRecord . . http://blog.rayapps.com/2008/09/26/openworld-unconference-presentation-about-rails-on-oracle/ , Rails Oracle.

+9

update: this will crash if you use ",: require => false". Deletion of this parameter is performed as expected.

Does this really have to work?

~/Projects/test (master) $ rake db:structure:dump
(in /Users/plentz/Projects/test)
rake aborted!
Task not supported by 'oracle_enhanced'

(See full trace by running task with --trace)

Gemfile

gem 'activerecord-oracle_enhanced-adapter', :require => false

Using activerecord-oracle_enhanced-adapter (1.3.2) 
+1
source

Source: https://habr.com/ru/post/1698921/


All Articles