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.5.9 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.8 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.7 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.6 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.5 lib/switchman/active_record/tasks/database_tasks.rb
switchman-3.5.4 lib/switchman/active_record/tasks/database_tasks.rb