Commit 35782d33 by thanhnd

add index to migration

parent 4432b5e6
Pipeline #470 failed with stages
in 0 seconds
...@@ -6,5 +6,6 @@ class CreateCities < ActiveRecord::Migration[6.0] ...@@ -6,5 +6,6 @@ class CreateCities < ActiveRecord::Migration[6.0]
t.string :city_description t.string :city_description
t.timestamps t.timestamps
end end
add_index :cities, :city_name
end end
end end
...@@ -10,5 +10,6 @@ class CreateCompanies < ActiveRecord::Migration[6.0] ...@@ -10,5 +10,6 @@ class CreateCompanies < ActiveRecord::Migration[6.0]
t.string :size t.string :size
t.timestamps t.timestamps
end end
add_index :companies, :email
end end
end end
...@@ -32,6 +32,7 @@ ActiveRecord::Schema.define(version: 2020_02_04_084755) do ...@@ -32,6 +32,7 @@ ActiveRecord::Schema.define(version: 2020_02_04_084755) do
t.string "city_description" t.string "city_description"
t.datetime "created_at", precision: 6, null: false t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
t.index ["city_name"], name: "index_cities_on_city_name"
end end
create_table "companies", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table "companies", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
...@@ -44,6 +45,7 @@ ActiveRecord::Schema.define(version: 2020_02_04_084755) do ...@@ -44,6 +45,7 @@ ActiveRecord::Schema.define(version: 2020_02_04_084755) do
t.string "size" t.string "size"
t.datetime "created_at", precision: 6, null: false t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false t.datetime "updated_at", precision: 6, null: false
t.index ["email"], name: "index_companies_on_email"
end end
create_table "industries", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t| create_table "industries", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment