Skip to content

Commit

Permalink
Merge pull request #6945 from fjordllc/feature/remove-discord-account…
Browse files Browse the repository at this point in the history
…-attribute-and-leave-discord-profile-attribute

不要なdiscord_accountの記述を削除する
  • Loading branch information
komagata authored Nov 7, 2023
2 parents 3376542 + a0eacbc commit 5017f6d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/controllers/current_user_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
5 changes: 1 addition & 4 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/models/times_channel_creator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5017f6d

Please sign in to comment.