Sha256: 7c68366e6281061e31a2103606ef51c2a3d3b23a4797fae55540e36a62bc27aa

Contents?: true

Size: 522 Bytes

Versions: 26

Compression:

Stored size: 522 Bytes

Contents

# frozen_string_literal: true

module Switchman
  module ActiveRecord
    module Tasks
      module DatabaseTasks
        def drop(*)
          super
          # no really, it's gone
          Switchman.cache.delete("default_shard")
          Shard.default(reload: true)
        end

        def raise_for_multi_db(*)
          # ignore; Switchman doesn't use namespaced tasks for multiple shards; it uses
          # environment variables to filter which shards you want to target
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
switchman-3.6.7 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.6.6 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.6.5 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.6.3 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.6.2 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.6.1 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.6.0 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.22 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.21 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.20 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.19 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.18 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.17 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.16 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.15 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.14 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.13 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.12 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.11 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.10 lib/switchman/active_record/tasks/database_tasks.rb