vendredi 24 juin 2016
rake db:schema:dump is not producing schema for all databases
I have this project and I need to integrate a bunch of databases into my Rails project.
This is the database configuration that I have to work with.
$ nano config/database.yml
production:
adapter: mysql2
reconnect: true
pool: 5
username: user_xyz
password: 123456
database: database1
host: localhost
database_2:
adapter: mysql2
reconnect: false
pool: 5
username: user_xyz
password: 123456
database: database2
host: 192.168.2.100
database_3:
adapter: mysql2
reconnect: false
pool: 5
username: user_xyz
password: 123456
database: database3
host: 192.168.2.101
database_4:
adapter: mysql2
reconnect: false
database: database4
pool: 5
username: user_xyz
password: 123456
host: 192.168.2.102
I need to update the schema inside db/schema.rb but unfortunately it's only producing the schema for production (database1).
$ RAILS_ENV=production bundle exec rake db:schema:dump
I can't just run this as it complains:
$ bundle exec rake db:schema:dump
rake aborted!
database configuration does not specify adapter
What do I need to do to get all of these databases into db/schema.rb?
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire