bump switchman
Change-Id: I4560d29d1e43a4aa8acaf734be4b8fd1862aebf2 Reviewed-on: https://gerrit.instructure.com/162363 Reviewed-by: Keith T. Garner <kgarner@instructure.com> Reviewed-by: Rob Orton <rob@instructure.com> Product-Review: Rob Orton <rob@instructure.com> QA-Review: Rob Orton <rob@instructure.com> Tested-by: Jenkins
This commit is contained in:
parent
7f3a1be7aa
commit
bdde8f2043
|
@ -38,7 +38,7 @@ gem 'active_model_serializers', '0.9.0alpha1',
|
|||
gem 'authlogic', '4.0.1'
|
||||
gem 'scrypt', '3.0.5'
|
||||
gem 'active_model-better_errors', '1.6.7', require: 'active_model/better_errors'
|
||||
gem 'switchman', '1.12.3'
|
||||
gem 'switchman', '1.12.6'
|
||||
gem 'open4', '1.3.4', require: false
|
||||
gem 'folio-pagination', '0.0.12', require: 'folio/rails'
|
||||
# for folio, see the folio README
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# This migration comes from switchman (originally 20180828183945)
|
||||
class AddDefaultShardIndex < ActiveRecord::Migration[4.2]
|
||||
tag :postdeploy
|
||||
|
||||
def change
|
||||
Switchman::Shard.where(default: nil).update_all(default: false)
|
||||
change_column_default :switchman_shards, :default, false
|
||||
change_column_null :switchman_shards, :default, false
|
||||
options = if connection.adapter_name == 'PostgreSQL'
|
||||
{ unique: true, where: "\"default\"" }
|
||||
else
|
||||
{}
|
||||
end
|
||||
add_index :switchman_shards, :default, options
|
||||
end
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# This migration comes from switchman (originally 20180828192111)
|
||||
class AddTimestampsToShards < ActiveRecord::Migration[4.2]
|
||||
tag :predeploy
|
||||
|
||||
def change
|
||||
add_timestamps :switchman_shards, null: true
|
||||
now = Time.now.utc
|
||||
Switchman::Shard.update_all(updated_at: now, created_at: now)
|
||||
change_column_null :switchman_shards, :updated_at, false
|
||||
change_column_null :switchman_shards, :created_at, false
|
||||
|
||||
if Switchman::Shard.current.default?
|
||||
Switchman::Shard.connection.schema_cache.clear!
|
||||
Switchman::Shard.reset_column_information
|
||||
Switchman::Shard.columns
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue