ruby - Rails with Octopus gem. How to create db's defined in shards.yml with rake -


I need to configure my app to use several shards, and even many DB adapters I have seen that all rake commands like are working, and the results on shards defined in shards.yml, except rake db: create . It will be a real pain to make all manually. How can i work it

My database. IML (I defined here, only my master shard)

  Development: Adapter: PostgreSQL host: Localhost encoding: Unicode database: db_workload_master_development pool: 5 Username: Password: Production: ......  

My shards.yml

Octopus: environment: - Production - Development development: shards : Mysql: host: localhost adapter: mysql2 database: db_workload_mysql_shard_development sqlite: host: localhost adapter: sqlite3 database: db_workload_sqlite_shard_development pg: host: localhost adapter: postgresql database: Db_workload_pg_shard_development pool: 5 Username: Password: Production: ....

From database.yml, only the DB can get the rake-work Rack db: .

I recommend creating my own rake work which is shards.yml Will read and make DB in the proper form.


Comments

Popular posts from this blog

eclipse plugin - Run java code error: Workspace is closed -

ios - How do I use CFArrayRef in Swift? -

scala - Play Framework - how to bind form to a session field -