From ddd7096d1e9e669a67d5e24a23a4975c35d0e858 Mon Sep 17 00:00:00 2001 From: thmz337 Date: Thu, 22 Aug 2024 21:37:46 +0900 Subject: [PATCH 1/3] =?UTF-8?q?User=E3=83=A2=E3=83=87=E3=83=AB=E3=81=8B?= =?UTF-8?q?=E3=82=89=E3=80=81experience=E3=82=AB=E3=83=A9=E3=83=A0?= =?UTF-8?q?=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/user.rb | 8 -------- db/migrate/20240822122324_remove_experience_from_users.rb | 5 +++++ db/schema.rb | 3 +-- 3 files changed, 6 insertions(+), 10 deletions(-) create mode 100644 db/migrate/20240822122324_remove_experience_from_users.rb diff --git a/app/models/user.rb b/app/models/user.rb index b7f78d90c77..2c7897905ad 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -46,14 +46,6 @@ class User < ApplicationRecord windows_wsl2: 3 }, _prefix: true - enum experience: { - inexperienced: 0, - html_css: 1, - other_ruby: 2, - ruby: 3, - rails: 4 - }, _prefix: true - enum editor: { vscode: 0, ruby_mine: 1, diff --git a/db/migrate/20240822122324_remove_experience_from_users.rb b/db/migrate/20240822122324_remove_experience_from_users.rb new file mode 100644 index 00000000000..53779710886 --- /dev/null +++ b/db/migrate/20240822122324_remove_experience_from_users.rb @@ -0,0 +1,5 @@ +class RemoveExperienceFromUsers < ActiveRecord::Migration[6.1] + def change + remove_column :users, :experience, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index 48f5c457670..e2f23271aae 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2024_07_12_074411) do +ActiveRecord::Schema.define(version: 2024_08_22_122324) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -730,7 +730,6 @@ t.integer "job" t.string "organization" t.integer "os" - t.integer "experience" t.text "retire_reason" t.boolean "trainee", default: false, null: false t.boolean "free", default: false, null: false From 87d12209988c01645fd2d05009968c1c45c8e22b Mon Sep 17 00:00:00 2001 From: thmz337 Date: Thu, 22 Aug 2024 23:25:29 +0900 Subject: [PATCH 2/3] =?UTF-8?q?test=E5=86=85=E3=81=AEexperience=E3=82=92ex?= =?UTF-8?q?periences=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/integration/discord/users_controller_test.rb | 4 ++-- test/models/user_test.rb | 8 ++++---- test/system/current_user/bookmarks_test.rb | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/test/integration/discord/users_controller_test.rb b/test/integration/discord/users_controller_test.rb index c4cb9ac482a..4746e767860 100644 --- a/test/integration/discord/users_controller_test.rb +++ b/test/integration/discord/users_controller_test.rb @@ -26,7 +26,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest description: '現役生と言います。よろしくお願いします。', job: 'part_time_worker', os: 'linux', - experience: 'inexperienced', + experiences: 0, password: 'passW0rd1234', password_confirmation: 'passW0rd1234', coc: 1, @@ -61,7 +61,7 @@ class UsersControllerTest < ActionDispatch::IntegrationTest description: '研修生と言います。よろしくお願いします。', job: 'office_worker', os: 'windows_wsl2', - experience: 'ruby', + experiences: 2, password: 'passW0rd1234', password_confirmation: 'passW0rd1234', coc: 1, diff --git a/test/models/user_test.rb b/test/models/user_test.rb index 47ad7a96595..13f70364230 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -544,7 +544,7 @@ class UserTest < ActiveSupport::TestCase course: courses(:course1), job: 'student', os: 'mac', - experience: 'ruby', + experiences: 2, created_at: Time.current - 30.days, sent_student_followup_message: false ) @@ -558,7 +558,7 @@ class UserTest < ActiveSupport::TestCase course: courses(:course1), job: 'student', os: 'mac', - experience: 'ruby', + experiences: 2, created_at: Time.current, sent_student_followup_message: false ) @@ -578,7 +578,7 @@ class UserTest < ActiveSupport::TestCase course: courses(:course1), job: 'student', os: 'mac', - experience: 'ruby', + experiences: 2, hibernated_at: nil, created_at: Time.current - 30.days, sent_student_followup_message: false @@ -610,7 +610,7 @@ class UserTest < ActiveSupport::TestCase course: courses(:course1), job: 'student', os: 'mac', - experience: 'ruby', + experiences: 2, hibernated_at: nil, created_at: Time.current - 30.days, sent_student_followup_message: false diff --git a/test/system/current_user/bookmarks_test.rb b/test/system/current_user/bookmarks_test.rb index e261df8d839..f53c066e5b6 100644 --- a/test/system/current_user/bookmarks_test.rb +++ b/test/system/current_user/bookmarks_test.rb @@ -14,7 +14,7 @@ class CurrentUser::BookmarksTest < ApplicationSystemTestCase course: courses(:course1), job: 'office_worker', os: 'mac', - experience: 'inexperienced' + experiences: 0 ) visit_with_auth '/current_user/bookmarks', user_without_bookmark.login_name assert_text 'ブックマークはまだありません。' @@ -66,7 +66,7 @@ class CurrentUser::BookmarksTest < ApplicationSystemTestCase course: courses(:course1), job: 'office_worker', os: 'mac', - experience: 'inexperienced' + experiences: 0 ) user_with_one_bookmark.bookmarks.create!(bookmarkable_id: reports(:report1).id, bookmarkable_type: 'Report') visit_with_auth '/current_user/bookmarks', user_with_one_bookmark.login_name @@ -91,7 +91,7 @@ class CurrentUser::BookmarksTest < ApplicationSystemTestCase course: courses(:course1), job: 'office_worker', os: 'mac', - experience: 'inexperienced' + experiences: 0 ) (1..20).each do |n| user_with_some_bookmarks.bookmarks.create!(bookmarkable_id: reports("report#{n}".to_sym).id, bookmarkable_type: 'Report') @@ -114,7 +114,7 @@ class CurrentUser::BookmarksTest < ApplicationSystemTestCase course: courses(:course1), job: 'office_worker', os: 'mac', - experience: 'inexperienced' + experiences: 0 ) (1..21).each do |n| user_with_many_bookmarks.bookmarks.create!(bookmarkable_id: reports("report#{n}".to_sym).id, bookmarkable_type: 'Report') From 1ab5071e1315712e242984ac677d33bb86c5d158 Mon Sep 17 00:00:00 2001 From: thmz337 Date: Thu, 22 Aug 2024 23:26:54 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=E7=BF=BB=E8=A8=B3=E3=83=95=E3=82=A1?= =?UTF-8?q?=E3=82=A4=E3=83=AB=E3=81=8B=E3=82=89experience=E3=81=AE?= =?UTF-8?q?=E7=AE=87=E6=89=80=E3=82=92=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/locales/ja.yml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 05202cb0dbf..dfa97ffb5c6 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -71,7 +71,6 @@ ja: job: 職業 os: 利用OS study_place: 主な学習場所 - experience: プログラミング経験 experiences: プログラミング経験 editor: 使用しているエディタ organization: 現在の所属組織 @@ -318,12 +317,6 @@ ja: study_place: local: フィヨルドブートキャンプオフィス remote: 自宅 - experience: - inexperienced: 未経験 - html_css: HTML/CSS経験あり - other_ruby: Ruby以外の言語経験あり - ruby: Ruby経験あり - rails: Rails経験あり editor: vscode: VSCode ruby_mine: RubyMine