-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
db:migrate breaks on read-only slave #345
Comments
@junheon you can try setting up default database in your
|
Hi, |
Seeing the same issue here. |
You can try setting up default database in your return unless Octopus.enabled?
module Octopus
class ProxyConfig
# cover shard_names method
def shard_names
# support db those commands
if ARGV[0].match(/^db:/).present?
["master"]
else
# default
shards.keys
end
end
end
end |
This idea ignore migration for shard db. |
@tuliang Could you explain what Here is my octopus:
replicated: true
fully_replicated: false
environments:
- development
- staging
- production
development:
slave:
adapter: mysql2
database: DB_NAME
username: USERNAME
password: PASSWORD
host: SLAVE_HOSTNAME
port: PORT
pool: pool_count
staging:
slave:
adapter: mysql2
database: DB_NAME
username: USERNAME
password: PASSWORD
host: SLAVE_HOSTNAME
port: PORT
pool: pool_count
production:
slave:
adapter: mysql2
database: DB_NAME
username: USERNAME
password: PASSWORD
host: SLAVE_HOSTNAME
port: PORT
pool: pool_count |
I'm using aws Aurora for my production database and I using both write-only cluster and read-only replica.
When I run
rake db:migrate
, following errors are always caused:How can I disable slaves for db migration?
The text was updated successfully, but these errors were encountered: