run migration to create database
Check out, review, and merge locally
Step 1. Fetch and check out the branch for this merge request
git fetch origin git checkout -b database origin/database
Step 2. Review the changes locally
Step 3. Merge the branch and fix any conflicts that come up
git checkout master git merge --no-ff database
Step 4. Push the result of the merge to GitLab
git push origin master
Note that pushing to GitLab requires write access to this repository.
Tip: You can also checkout merge requests locally by following these guidelines.
-
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- 860fb0d0 - fix migration
added 1 commit * 860fb0d0 - fix migration [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5309&start_sha=220791af1ad4033c483a47a0206fec00bf6b37de)Toggle commit list -
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/applies_job.rb 0 → 100644
1 class AppliesJob < ApplicationRecord -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB thì tên bảng là
apply_jobs. Model đúng làApplyJobchứ em?@phuongnhm Theo thiết kế DB thì tên bảng là `apply_jobs`. Model đúng là `ApplyJob` chứ em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#c5d688c85b2339c36ee4b787e67c0cffa82ed6d1_1_0)Toggle commit list
Please register or sign in to reply -
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/city.rb 0 → 100644
1 class City < ApplicationRecord 2 has_and_belongs_to_many :jobs 3 has_and_belongs_to_many :companies 4 has_many :regions -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB thì qua hệ giữa Region-City là 1-n Nghĩa là Region có nhiều cities và City thuộc về 1 region.
@phuongnhm Theo thiết kế DB thì qua hệ giữa Region-City là 1-n Nghĩa là Region có nhiều cities và City thuộc về 1 region. -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#28495972e963898abf2919ffeaeb92fbdf49fb8e_4_5)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/job.rb 0 → 100644
1 class Job < ApplicationRecord 2 has_and_belongs_to_many :users -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Chỗ này đại diện cho quan hệ nào vậy em?
@phuongnhm Chỗ này đại diện cho quan hệ nào vậy em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#742abd5cbc2b12d2da315862ace6297c7d6dcb87_2_2)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/job.rb 0 → 100644
1 class Job < ApplicationRecord 2 has_and_belongs_to_many :users 3 has_and_belongs_to_many :industries 4 has_and_belongs_to_many :cities 5 has_many :applies_jobs -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB thì chỗ này là
has_many :apply_jobsmới đúng chứ em?@phuongnhm Theo thiết kế DB thì chỗ này là `has_many :apply_jobs` mới đúng chứ em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#742abd5cbc2b12d2da315862ace6297c7d6dcb87_5_8)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/job.rb 0 → 100644
1 class Job < ApplicationRecord 2 has_and_belongs_to_many :users 3 has_and_belongs_to_many :industries 4 has_and_belongs_to_many :cities 5 has_many :applies_jobs 6 has_many :users, through: :applies_jobs -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Cần thiết định nghĩa quan hệ với User ở đây không em?
Job có nhiều usersngữ nghĩa là gì ta?@phuongnhm Cần thiết định nghĩa quan hệ với User ở đây không em? `Job có nhiều users` ngữ nghĩa là gì ta? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#742abd5cbc2b12d2da315862ace6297c7d6dcb87_6_8)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/region.rb 0 → 100644
1 class Region < ApplicationRecord 2 belongs_to :city -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB thì qua hệ giữa Region-City là 1-n Nghĩa là Region có nhiều cities và City thuộc về 1 region.
@phuongnhm Theo thiết kế DB thì qua hệ giữa Region-City là 1-n Nghĩa là Region có nhiều cities và City thuộc về 1 region. -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#1b0403e2c9739b73026d45d5afbc4b94faccfd28_2_2)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/user.rb 0 → 100644
1 class User < ApplicationRecord 2 has_and_belongs_to_many :jobs -
Thanh Hung Pham @hungpt commentedMasterEdited by Thanh Hung Pham
@phuongnhm Chỗ này đại diện cho quan hệ nào vậy em?
@phuongnhm Chỗ này đại diện cho quan hệ nào vậy em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#4ed0c03b53dbc8320da88e7887465514cd9e90a4_2_2)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/user.rb 0 → 100644
1 class User < ApplicationRecord 2 has_and_belongs_to_many :jobs 3 has_many :applies_jobs -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB thì chỗ này là
has_many :apply_jobsmới đúng chứ em?@phuongnhm Theo thiết kế DB thì chỗ này là `has_many :apply_jobs` mới đúng chứ em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#4ed0c03b53dbc8320da88e7887465514cd9e90a4_3_2)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongapp/models/user.rb 0 → 100644
1 class User < ApplicationRecord 2 has_and_belongs_to_many :jobs 3 has_many :applies_jobs 4 has_many :jobs, through: :applies_jobs -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Cần thiết định nghĩa quan hệ với Job ở đây không em?
User có nhiều jobsngữ nghĩa là gì ta?@phuongnhm Cần thiết định nghĩa quan hệ với Job ở đây không em? `User có nhiều jobs` ngữ nghĩa là gì ta? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#4ed0c03b53dbc8320da88e7887465514cd9e90a4_4_2)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
5 5 # gem 'sqlite3' 6 6 # 7 7 default: &default 8 adapter: sqlite3 8 adapter: mysql2 9 encoding: utf8mb4 9 10 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> 10 11 timeout: 5000 12 username: root -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Dữ liệu nhạy cảm không nên push lên nha em.
username và passwordNên tách riêng môi trường ra nha em. Em để trong default là nó apply cho cả 3 môi trường luôn á.production: <<: *default username: password: database: VeNJOB_production@phuongnhm Dữ liệu nhạy cảm không nên push lên nha em. `username và password` Nên tách riêng môi trường ra nha em. Em để trong default là nó apply cho cả 3 môi trường luôn á. ``` production: <<: *default username: password: database: VeNJOB_production ``` -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 4 of the diff
changed this line in version 4 of the diff
changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5313&start_sha=a3fdecf783a6de5af5f58d31926852e8b159b6d2#2c912561029efc03ffae15b01b7337417d7a99bd_12_12)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongdb/migrate/20210708024348_create_jobs.rb 0 → 100644
1 class CreateJobs < ActiveRecord::Migration[6.1] 2 def change 3 create_table :jobs do |t| -
Thanh Hung Pham @hungpt commentedMasterEdited by Thanh Hung Pham
@phuongnhm FK của bảng companies đâu em?
@phuongnhm FK của bảng companies đâu em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#9a77cb29fefc58e9147ee30e03c4c536d4f037a3_3_0)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongdb/migrate/20210708030507_create_cities.rb 0 → 100644
1 class CreateCities < ActiveRecord::Migration[6.1] 2 def change 3 create_table :cities do |t| -
Thanh Hung Pham @hungpt commentedMaster
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#0c495e6e6397f707fce8cf48caca42fad399a138_3_0)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
1 class CreateFavouritesJobs < ActiveRecord::Migration[6.1] 2 def change 3 create_table :favourites_jobs do |t| -
Thanh Hung Pham @hungpt commentedMasterEdited by Thanh Hung Pham
- Typo chữ
Favoritenha em. Sửa mấy chỗ khác luôn. - Theo thiết kế DB thì tên bảng
favorite_jobsmới đúng chứ em. - Anh không thấy em tạo Model cho bảng này?
@phuongnhm - Typo chữ `Favorite` nha em. Sửa mấy chỗ khác luôn. - Theo thiết kế DB thì tên bảng `favorite_jobs` mới đúng chứ em. - Anh không thấy em tạo Model cho bảng này? - Typo chữ
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#f2394039c4faad28aea3ce497e144ec3ed8a2631_3_0)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
1 class CreateHistorisJobs < ActiveRecord::Migration[6.1] 2 def change 3 create_table :historis_jobs do |t| -
Thanh Hung Pham @hungpt commentedMaster
- Typo chữ
Historynha em. - Theo thiết kế DB thì tên bảng
history_jobsmới đúng chứ em. - Anh không thấy em tạo Model cho bảng này?
@phuongnhm - Typo chữ `History` nha em. - Theo thiết kế DB thì tên bảng `history_jobs` mới đúng chứ em. - Anh không thấy em tạo Model cho bảng này? - Typo chữ
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#3b97e521998529368575d2f486af02668a46936e_3_0)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
1 class CreateCitiesCompanies < ActiveRecord::Migration[6.1] 2 def change 3 create_table :cities_companies do |t| -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB là
companies_citieschứ em?@phuongnhm Theo thiết kế DB là `companies_cities` chứ em? -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#46a2a0906e95dde3e033807b3fdc4f7bd1f0b485_3_0)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
1 class CreateAppliesJobs < ActiveRecord::Migration[6.1] 2 def change 3 create_table :applies_jobs do |t| -
Thanh Hung Pham @hungpt commentedMaster
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#37c8846edb3dbedfed94679e97f469d34335c0a0_3_0)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongdb/migrate/20210708034910_create_regions.rb 0 → 100644
1 class CreateRegions < ActiveRecord::Migration[6.1] 2 def change 3 create_table :regions do |t| 4 t.references :city, null: false, foreign_key: true -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Theo thiết kế DB thì FK này nằm bên bảng
citiesnha em.@phuongnhm Theo thiết kế DB thì FK này nằm bên bảng `cities` nha em. -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 3 of the diff
changed this line in version 3 of the diff
changed this line in [version 3 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63#13c53ff667c78a078847abc74cb7dbd47d9c43c5_4_0)Toggle commit list
-
-
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- a3fdecf7 - continue fix migration
added 1 commit * a3fdecf7 - continue fix migration [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5312&start_sha=860fb0d0fc17e3808cb7cd13cabadca1474c5a63)Toggle commit list -
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuongdb/migrate/20210709040246_create_cities.rb 0 → 100644
1 class CreateCities < ActiveRecord::Migration[6.1] 2 def change 3 create_table :cities do |t| 4 t.references :regions, null: false, foreign_key: true -
Thanh Hung Pham @hungpt commentedMaster
- Em xem lại
t.referencesđể hiểu rõ lại nha em. - Ở đây em để
regionsnó sẽ tạo ra 1 FK làregions_idnhư vậy là chưa đúng convention nha em. - Em xem trong
schema.rbsẽ thấy - Kiểm tra mấy bảng khác luôn nha em.
@phuongnhm - Em xem lại `t.references` để hiểu rõ lại nha em. - Ở đây em để `regions` nó sẽ tạo ra 1 FK là `regions_id` như vậy là chưa đúng convention nha em. - Em xem trong `schema.rb` sẽ thấy - Kiểm tra mấy bảng khác luôn nha em. - Em xem lại
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 4 of the diff
changed this line in version 4 of the diff
changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5313&start_sha=a3fdecf783a6de5af5f58d31926852e8b159b6d2#82fb3ec223c66c6a03356427a6a9ddc6e2a845bc_4_4)Toggle commit list
-
-
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
1 class CreateIndustriesJobs < ActiveRecord::Migration[6.1] 2 def change 3 create_table :industries_jobs do |t| 4 t.references :jobs, null: false, foreign_key: true -
Thanh Hung Pham @hungpt commentedMaster
@phuongnhm Chỗ này em move
t.references :industrieslên trướct.references :jobscho giống với tên bảng nha.@phuongnhm Chỗ này em move `t.references :industries` lên trước `t.references :jobs` cho giống với tên bảng nha. -
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 4 of the diff
changed this line in version 4 of the diff
changed this line in [version 4 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5313&start_sha=a3fdecf783a6de5af5f58d31926852e8b159b6d2#21194aa6a81bfe23be34b2780fb28a958f802842_4_4)Toggle commit list
-
-
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- e9c61089 - review migration
added 1 commit * e9c61089 - review migration [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5313&start_sha=a3fdecf783a6de5af5f58d31926852e8b159b6d2)Toggle commit list -
Nguyen Hoang Mai Phuong @phuongnhm
resolved all discussions
resolved all discussions
resolved all discussionsToggle commit list -
Thanh Hung Pham@hungpt started a discussion on an old version of the diffResolved by Nguyen Hoang Mai Phuong
1 class CreateCompaniesCities < ActiveRecord::Migration[6.1] 2 def change 3 create_table :companies_cities do |t| 4 t.references :companie, null: false, foreign_key: true -
Thanh Hung Pham @hungpt commentedMaster
-
Nguyen Hoang Mai Phuong @phuongnhm
changed this line in version 5 of the diff
changed this line in version 5 of the diff
changed this line in [version 5 of the diff](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5314&start_sha=e9c61089c776ebb24ef913db3c8916b11fd48f04#2dd6046ab5ed5efac82437b49ceac90d884c09b3_4_4)Toggle commit list
-
-
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- 26fac8bb - complete database
added 1 commit * 26fac8bb - complete database [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5314&start_sha=e9c61089c776ebb24ef913db3c8916b11fd48f04)Toggle commit list -
Nguyen Hoang Mai Phuong @phuongnhm
resolved all discussions
resolved all discussions
resolved all discussionsToggle commit list -
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- 5383b554 - finally complete database
added 1 commit * 5383b554 - finally complete database [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5315&start_sha=26fac8bbb39eadf68a6089d2cc79c639050380bb)Toggle commit list -
Nguyen Hoang Mai Phuong @phuongnhm
added 1 commit
- 0cf394d3 - complete database
added 1 commit * 0cf394d3 - complete database [Compare with previous version](https://gitlab.zigexn.vn/phuongnhm/VeNJOB/merge_requests/1/diffs?diff_id=5316&start_sha=5383b55402757267ce4996fee374db660307ee50)Toggle commit list -
Thanh Hung Pham @hungpt
mentioned in commit 6a2e0164
mentioned in commit 6a2e0164
mentioned in commit 6a2e0164a53c99285d90b403bc4697772b9b7997Toggle commit list -
Thanh Hung Pham @hungpt
merged
merged
mergedToggle commit list