From 8e727d063e1cc5c78f3f6978ad1dd2edfd62e5db Mon Sep 17 00:00:00 2001 From: sochi419 Date: Sun, 1 Oct 2023 15:56:37 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E4=B8=8D=E8=A6=81=E3=81=AAdiscord=5Faccoun?= =?UTF-8?q?t=E3=81=AE=E8=A8=98=E8=BF=B0=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/controllers/current_user_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/current_user_controller.rb b/app/controllers/current_user_controller.rb index d57c4467e03..f06bfce0afa 100644 --- a/app/controllers/current_user_controller.rb +++ b/app/controllers/current_user_controller.rb @@ -22,7 +22,7 @@ def user_params user_attribute = [ :adviser, :login_name, :name, :name_kana, :email, :course_id, - :description, :job_seeking, :discord_account, + :description, :job_seeking, :github_account, :twitter_account, :facebook_url, :blog_url, :password, :password_confirmation, :job, :organization, :os, From 57649d1ae14471caab98d9b051a5bf19fe111644 Mon Sep 17 00:00:00 2001 From: sochi419 Date: Sun, 1 Oct 2023 22:19:27 +0900 Subject: [PATCH 2/5] =?UTF-8?q?Users=E3=81=8B=E3=82=89discord=5Faccount,?= =?UTF-8?q?=20times=5Furl,=20times=5Fid=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 --- ...iscord_account_and_times_url_and_times_id_from_users.rb | 7 +++++++ db/schema.rb | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20231001031818_remove_discord_account_and_times_url_and_times_id_from_users.rb diff --git a/db/migrate/20231001031818_remove_discord_account_and_times_url_and_times_id_from_users.rb b/db/migrate/20231001031818_remove_discord_account_and_times_url_and_times_id_from_users.rb new file mode 100644 index 00000000000..bb0a6f64f4a --- /dev/null +++ b/db/migrate/20231001031818_remove_discord_account_and_times_url_and_times_id_from_users.rb @@ -0,0 +1,7 @@ +class RemoveDiscordAccountAndTimesUrlAndTimesIdFromUsers < ActiveRecord::Migration[6.1] + def change + remove_column :users, :discord_account, :string + remove_column :users, :times_url, :string + remove_column :users, :times_id, :string + end +end diff --git a/db/schema.rb b/db/schema.rb index c3e05d69117..9586db0cdae 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: 2023_09_25_075918) do +ActiveRecord::Schema.define(version: 2023_10_01_031818) do # These are extensions that must be enabled in order to support this database enable_extension "pgcrypto" @@ -719,8 +719,11 @@ t.bigint "retire_reasons", default: 0, null: false t.string "unsubscribe_email_token" t.text "mentor_memo" +<<<<<<< HEAD t.string "discord_account" t.string "times_url" +======= +>>>>>>> b9e7e94dd (Usersからdiscord_account, times_url, times_idカラムを削除) t.text "after_graduation_hope" t.date "training_ends_on" t.boolean "sad_streak", default: false, null: false From b3eb4d0d3d0c6c50f2c526a1bd6475053dcc9d45 Mon Sep 17 00:00:00 2001 From: sochi419 Date: Sun, 1 Oct 2023 22:36:02 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=82=AB=E3=83=A9=E3=83=A0=E5=89=8A?= =?UTF-8?q?=E9=99=A4=E3=81=AB=E3=82=88=E3=82=8B=E5=BD=B1=E9=9F=BF=E3=81=A7?= =?UTF-8?q?=E3=80=81=E6=97=A2=E5=AD=98=E3=81=AE=E3=83=86=E3=82=B9=E3=83=88?= =?UTF-8?q?=E5=86=85=E5=AE=B9=E3=82=92=E4=B8=80=E9=83=A8=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/models/times_channel_creator_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/models/times_channel_creator_test.rb b/test/models/times_channel_creator_test.rb index 9d46c647ab0..e1288082250 100644 --- a/test/models/times_channel_creator_test.rb +++ b/test/models/times_channel_creator_test.rb @@ -12,7 +12,7 @@ class TimesChannelCreatorTest < ActiveSupport::TestCase Discord::TimesChannel.stub(:new, ->(_) { InvalidTimesChannel.new }) do TimesChannelCreator.new.call(user) end - assert_nil user.times_id + assert_nil user.discord_profile.times_id assert_equal "[Discord API] #{user.login_name}の分報チャンネルが作成できませんでした。", logs.pop Discord::TimesChannel.stub(:new, ->(_) { ValidTimesChannel.new }) do From a05246dd9f64f5631e42119f8a2d9cdf018a9684 Mon Sep 17 00:00:00 2001 From: sochi419 Date: Fri, 3 Nov 2023 15:11:43 +0900 Subject: [PATCH 4/5] =?UTF-8?q?conflict=E8=A7=A3=E6=B6=88=E3=82=92?= =?UTF-8?q?=E3=81=97=E5=BF=98=E3=82=8C=E3=81=9F=E9=83=A8=E5=88=86=E3=81=AB?= =?UTF-8?q?=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 9586db0cdae..bf54e14ee17 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -719,11 +719,8 @@ t.bigint "retire_reasons", default: 0, null: false t.string "unsubscribe_email_token" t.text "mentor_memo" -<<<<<<< HEAD t.string "discord_account" t.string "times_url" -======= ->>>>>>> b9e7e94dd (Usersからdiscord_account, times_url, times_idカラムを削除) t.text "after_graduation_hope" t.date "training_ends_on" t.boolean "sad_streak", default: false, null: false From a0eacbc70fdaac1651ca1872746916de5403b508 Mon Sep 17 00:00:00 2001 From: sochi419 Date: Mon, 6 Nov 2023 17:14:29 +0900 Subject: [PATCH 5/5] =?UTF-8?q?migration=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=81=AE=E5=86=85=E5=AE=B9=E3=82=92schema.rb=E3=81=AB?= =?UTF-8?q?=E5=8F=8D=E6=98=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/schema.rb | 3 --- 1 file changed, 3 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index bf54e14ee17..abde98c3b4d 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -719,8 +719,6 @@ t.bigint "retire_reasons", default: 0, null: false t.string "unsubscribe_email_token" t.text "mentor_memo" - t.string "discord_account" - t.string "times_url" t.text "after_graduation_hope" t.date "training_ends_on" t.boolean "sad_streak", default: false, null: false @@ -732,7 +730,6 @@ t.text "profile_text" t.string "feed_url" t.boolean "sent_student_followup_message", default: false - t.string "times_id", comment: "Snowflake ID" t.string "country_code" t.string "subdivision_code" t.boolean "auto_retire", default: true