Sha256: bb4c25c9c9e5a46311c3a115be0f31047d78dd3627b58820400648f33ec1ff13
Contents?: true
Size: 822 Bytes
Versions: 4
Compression:
Stored size: 822 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 = if Octopus.rails31? || Octopus.rails32? ActiveRecord::Migrator.migrations_paths else ActiveRecord::Migrator.migrations_path end 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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ar-octopus-0.7.0 | lib/tasks/octopus.rake |
ar-octopus-0.6.1 | lib/tasks/octopus.rake |
ar-octopus-0.6.0 | lib/tasks/octopus.rake |
ar-octopus-0.5.0 | lib/tasks/octopus.rake |