1
0
Fork 0

Merge migrations

This commit is contained in:
Alex Kotov 2019-07-22 08:04:38 +05:00
parent 2ec5a853e0
commit 4ce7051e32
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
5 changed files with 2 additions and 31 deletions

View file

@ -29,7 +29,8 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
create_table :country_states do |t|
t.timestamps null: false
t.string :name, null: false, index: { unique: true }
t.string :english_name, null: false, index: { unique: true }
t.string :native_name, null: false, index: { unique: true }
end
create_table :regional_offices do |t|

View file

@ -1,10 +0,0 @@
# frozen_string_literal: true
class AddEnglishNameToCountryStates < ActiveRecord::Migration[6.0]
def change
# rubocop:disable Rails/NotNullColumn
add_column :country_states, :english_name, :string, null: false
add_index :country_states, :english_name, unique: true
# rubocop:enable Rails/NotNullColumn
end
end

View file

@ -1,10 +0,0 @@
# frozen_string_literal: true
class AddNativeNameToCountryStates < ActiveRecord::Migration[6.0]
def change
# rubocop:disable Rails/NotNullColumn
add_column :country_states, :native_name, :string, null: false
add_index :country_states, :native_name, unique: true
# rubocop:enable Rails/NotNullColumn
end
end

View file

@ -1,7 +0,0 @@
# frozen_string_literal: true
class RemoveNameFromCountryStates < ActiveRecord::Migration[6.0]
def change
remove_column :country_states, :name, :string, index: { unique: true }
end
end

View file

@ -1140,9 +1140,6 @@ SET search_path TO "$user", public;
INSERT INTO "schema_migrations" (version) VALUES
('20181129203927'),
('20181130024918'),
('20190324204513'),
('20190324210722'),
('20190324211036'),
('20190326200244'),
('20190427141639'),
('20190623160009'),