-
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
Any configuration to disable running of migrations on slave databases? #421
Comments
I'm also having this issue right now. According to the documentation, it says:
If you look at the source code though, it sends your migrations to all shards regardless of what you specify. Am I missing something? |
I have the same problem |
Same problem here, any news? |
Hi @dkumar431 / @PatrickTulskie / @Zeneixe / @knightq , Can you provide more information about your setups? Are you guys using replication or sharding? If you don't specify anything, Octopus should send your database migrations only to master. If it is sending to your replicated database, them it's a bug. Thiago |
@thiagopradi I don't have the exact setup handy since I had to tear everything out of our production systems shortly after reporting this. We were only using replication though. We do not shard anything. With our setup, we were just trying to add read-only nodes and it mostly worked. The biggest issue we had was migrations attempting to go to the reader nodes instead of just the main node. When I was digging through the source code at the time, I couldn't figure out a clean fix for it so we wound up removing octopus. |
I'm seeing the same issue. I'm set up for replication ( Perhaps it has to do with the octopus/lib/octopus/migration.rb Line 108 in 1c9a07f
Versions |
We faced the same issue. I suppose, this current issue is related with #353 and #345. After some investigation we realized that this option may help: #345 (comment) The other option is to use dynamic configuration during migration, something like this: # config/initializers/octopus.rb
Octopus.setup do |config|
config.environments = [] if ENV['DB_MIGRATE']
end
# And then pass this env variable on migration run:
# DB_MIGRATE=1 bin/rails db:migrate Both options were tested with Rails 5.0 and Octopus 0.10.2. |
Hi All,
I am using heroku postgrees follower database on heroku. I just want to run my migrations on master database and not on slaves.
Any central configuration option in octopus that will disable the running of migration on slaves?
The text was updated successfully, but these errors were encountered: