Sha256: d5801ec69ebb9ad85214f3384260b367bb70c06201a51fe300040922b686adf5
Contents?: true
Size: 638 Bytes
Versions: 14
Compression:
Stored size: 638 Bytes
Contents
namespace :octopus do desc 'Copy schema version information from master to all shards' task :copy_schema_versions => :environment do abort('Octopus is not enabled for this environment') unless Octopus.enabled? connection = ActiveRecord::Base.connection current_version = ActiveRecord::Migrator.current_version migrations_paths = ActiveRecord::Migrator.migrations_paths connection.send_queries_to_multiple_shards(connection.shard_names) do ActiveRecord::Schema.initialize_schema_migrations_table ActiveRecord::Schema.assume_migrated_upto_version(current_version, migrations_paths) end end end
Version data entries
14 entries across 14 versions & 4 rubygems