Sha256: af1d6aa01f76ba2ca40a4c5909f0b1336d5b4c86b8e37daf22b366c5d3420bc8
Contents?: true
Size: 501 Bytes
Versions: 22
Compression:
Stored size: 501 Bytes
Contents
# frozen_string_literal: true class AddUniqueNameIndexes < ActiveRecord::Migration[4.2] def change add_index :switchman_shards, [:database_server_id, :name], unique: true add_index :switchman_shards, :database_server_id, unique: true, where: "name IS NULL", name: 'index_switchman_shards_unique_primary_shard' add_index :switchman_shards, "(true)", unique: true, where: "database_server_id IS NULL AND name IS NULL", name: 'index_switchman_shards_unique_primary_db_and_shard' end end
Version data entries
22 entries across 22 versions & 1 rubygems