postgresql - Can Rails schema table be outside the database? -


we have legacy postgresql database accessible rails app except when vendor provides update 1 of consistency checks perform against database fails because rails has built "new" table there, schema migrations table. possible direct creation of table elsewhere? or possible use schema cache in rails 4 effect this? release notes section 3.3 on general things says "schema cache dump (commit) - improve rails boot time, instead of loading schema directly database, load schema dump file."

i found old blog post last time tried here. copying relevant parts:

to make dump of schema, execute following rake task:

rails_env=production bundle exec rake db:schema:cache:dump 

this generate file db/schema_cache.dump, rails use load internal state of schemacache instance.

to disable schema cache dump, add following config/production.rb file:

config.active_record.use_schema_cache_dump = false  

if clear schema cache, execute:

rails_env=production bundle exec rake db:schema:cache:clear 

Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -