Sha256: 6327a1f01a2ddcf0ff10082a4f75ad64433645c7c16eef23e24b763b81c1c069
Contents?: true
Size: 1.64 KB
Versions: 3
Compression:
Stored size: 1.64 KB
Contents
class RemoveUniquenessForRegistrationNumber < ActiveRecord::Migration def up remove_index "lines", name: "lines_registration_number_key" if index_exists?(:lines, :registration_number, name: "lines_registration_number_key") add_index "lines", ["registration_number"], :name => "lines_registration_number_key" remove_index "companies", name: "companies_registration_number_key" if index_exists?(:companies, :registration_number, name: "companies_registration_number_key") add_index "companies", ["registration_number"], :name => "companies_registration_number_key" remove_index "networks", name: "networks_registration_number_key" if index_exists?(:networks, :registration_number, name: "networks_registration_number_key") add_index "networks", ["registration_number"], :name => "networks_registration_number_key" end def down remove_index "lines", name: "lines_registration_number_key" if index_exists?(:lines, :registration_number, name: "lines_registration_number_key") add_index "lines", ["registration_number"], :name => "lines_registration_number_key", :unique => true remove_index "companies", name: "companies_registration_number_key" if index_exists?(:companies, :registration_number, name: "companies_registration_number_key") add_index "companies", ["registration_number"], :name => "companies_registration_number_key", :unique => true remove_index "networks", name: "networks_registration_number_key" if index_exists?(:networks, :registration_number, name: "networks_registration_number_key") add_index "networks", ["registration_number"], :name => "networks_registration_number_key", :unique => true end end
Version data entries
3 entries across 3 versions & 1 rubygems