Commit d4068924 by thanhnd

fix reviews 20200218 16:38

parent 32df57ae
Pipeline #468 failed with stages
in 0 seconds
class CreateCities < ActiveRecord::Migration[6.0]
def change
create_table :cities do |t|
t.column :area_id, :int
t.column :city_name, :string
t.column :city_description, :string
t.int :area_id
t.string :city_name
t.string :city_description
t.timestamps
end
add_index :cities, :area_id
add_index :city_name
end
end
class CreateCompanies < ActiveRecord::Migration[6.0]
def change
create_table :companies do |t|
t.column :company_name, :string
t.column :company_description, :text
t.column :address, :string
t.column :phone_number, :string
t.column :website, :string
t.column :email, :string
t.column :size, :int
t.string :company_name
t.text :company_description
t.string :address
t.string :phone_number
t.string :website
t.string :email
t.string :size
t.timestamps
end
add_index :companies, :email
add_index :companies_name
add_index :email
end
end
class CreateIndustries < ActiveRecord::Migration[6.0]
def change
create_table :industries do |t|
t.column :industry_name, :text, :null => false
t.column :industry_description, :string
t.text :industry_name
t.string :industry_description
t.timestamps
end
end
......
class CreateIndustryJobs < ActiveRecord::Migration[6.0]
def change
create_table :industry_jobs do |t|
t.column :industry_id, :int, :null => false
t.column :job_id, :int, :null => false
t.int :industry_id
t.int :job_id
t.timestamps
end
end
......
class CreateJobs < ActiveRecord::Migration[6.0]
def change
create_table :jobs do |t|
t.column :area_id, :int, :null => false
t.column :city_id, :int, :null => false
t.column :industry_id, :int, :null => false
t.column :company_id, :int, :null => false
t.column :code, :string, :null => false
t.column :job_name, :text, :null => false
t.column :salary, :string
t.column :deadline, :Date
t.column :level, :string
t.column :experience, :string
t.column :last_updated, :Date
t.column :description, :text
t.int :area_id
t.int :city_id
t.int :industry_id
t.int :company_id
t.text :job_name
t.string :salary
t.datetime :deadline
t.string :level
t.string :experience
t.datetime :last_updated
t.text :description
t.timestamps
end
end
......
class CreateUsers < ActiveRecord::Migration[6.0]
def change
create_table :users do |t|
t.column :email, :string, :null => false
t.column :fname, :string, :null => false
t.column :lname, :string, :null => false
t.column :role, :int, :null => false
t.column :remember_digest, :string
t.column :activation_digest, :string
t.column :activated, :Boolean
t.column :activated_at, :timestamp
t.column :reset_digest, :string
t.column :reset_sent_at, :timestamp
t.column :password_digest, :string
t.string :email
t.string :fname
t.string :lname
t.int :role
t.string :remember_digest
t.string :activation_digest
t.boolean :activated
t.datetime :activated_at
t.string :reset_digest
t.datetime :reset_sent_at
t.string :password_digest
t.timestamps
end
end
......
class CreateSavedJobs < ActiveRecord::Migration[6.0]
def change
create_table :saved_jobs do |t|
t.column :user_id, :int, :null => false
t.column :job_id, :int, :null => false
t.int :user_id
t.int :job_id
t.timestamps
end
end
......
class CreateAppliedJobs < ActiveRecord::Migration[6.0]
def change
create_table :applied_jobs do |t|
t.column :user_id, :int, :null => false
t.column :job_id, :int, :null => false
t.int :user_id
t.int :job_id
t.timestamps
end
end
......
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