Sha256: 16d607d2752c5067f343609c0660996c1111799486818829de1c7266e090e615
Contents?: true
Size: 638 Bytes
Versions: 4
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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ar-octopus-0.8.3 | lib/tasks/octopus.rake |
ar-octopus-0.8.2 | lib/tasks/octopus.rake |
ar-octopus-0.8.1 | lib/tasks/octopus.rake |
ar-octopus-0.8.0 | lib/tasks/octopus.rake |