step two of settings migration: delete old columns
This commit is contained in:
parent
8579be4d39
commit
7975da374f
18
db/migrate/20170225201811_delete_old_settings.rb
Normal file
18
db/migrate/20170225201811_delete_old_settings.rb
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
class DeleteOldSettings < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
[
|
||||||
|
:email_notifications,
|
||||||
|
:email_replies,
|
||||||
|
:pushover_replies,
|
||||||
|
:pushover_user_key,
|
||||||
|
:email_messages,
|
||||||
|
:pushover_messages,
|
||||||
|
:email_mentions,
|
||||||
|
:show_avatars,
|
||||||
|
:show_story_previews,
|
||||||
|
:show_submitted_story_threads,
|
||||||
|
].each do |col|
|
||||||
|
remove_column :users, "old_#{col}"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
42
db/schema.rb
42
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20170119192703) do
|
ActiveRecord::Schema.define(version: 20170225201811) do
|
||||||
|
|
||||||
create_table "comments", force: true do |t|
|
create_table "comments", force: true do |t|
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
|
@ -184,38 +184,28 @@ ActiveRecord::Schema.define(version: 20170119192703) do
|
||||||
add_index "tags", ["tag"], name: "tag", unique: true, using: :btree
|
add_index "tags", ["tag"], name: "tag", unique: true, using: :btree
|
||||||
|
|
||||||
create_table "users", force: true do |t|
|
create_table "users", force: true do |t|
|
||||||
t.string "username", limit: 50
|
t.string "username", limit: 50
|
||||||
t.string "email", limit: 100
|
t.string "email", limit: 100
|
||||||
t.string "password_digest", limit: 75
|
t.string "password_digest", limit: 75
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
t.boolean "old_email_notifications", default: false
|
t.boolean "is_admin", default: false
|
||||||
t.boolean "is_admin", default: false
|
t.string "password_reset_token", limit: 75
|
||||||
t.string "password_reset_token", limit: 75
|
t.string "session_token", limit: 75, default: "", null: false
|
||||||
t.string "session_token", limit: 75, default: "", null: false
|
t.text "about", limit: 16777215
|
||||||
t.text "about", limit: 16777215
|
|
||||||
t.integer "invited_by_user_id"
|
t.integer "invited_by_user_id"
|
||||||
t.boolean "old_email_replies", default: false
|
t.boolean "is_moderator", default: false
|
||||||
t.boolean "old_pushover_replies", default: false
|
t.boolean "pushover_mentions", default: false
|
||||||
t.string "old_pushover_user_key"
|
t.string "rss_token", limit: 75
|
||||||
t.boolean "old_email_messages", default: true
|
t.string "mailing_list_token", limit: 75
|
||||||
t.boolean "old_pushover_messages", default: true
|
t.integer "mailing_list_mode", default: 0
|
||||||
t.boolean "is_moderator", default: false
|
t.integer "karma", default: 0, null: false
|
||||||
t.boolean "old_email_mentions", default: false
|
|
||||||
t.boolean "pushover_mentions", default: false
|
|
||||||
t.string "rss_token", limit: 75
|
|
||||||
t.string "mailing_list_token", limit: 75
|
|
||||||
t.integer "mailing_list_mode", default: 0
|
|
||||||
t.integer "karma", default: 0, null: false
|
|
||||||
t.datetime "banned_at"
|
t.datetime "banned_at"
|
||||||
t.integer "banned_by_user_id"
|
t.integer "banned_by_user_id"
|
||||||
t.string "banned_reason", limit: 200
|
t.string "banned_reason", limit: 200
|
||||||
t.datetime "deleted_at"
|
t.datetime "deleted_at"
|
||||||
t.boolean "old_show_avatars", default: false
|
|
||||||
t.boolean "old_show_story_previews", default: false
|
|
||||||
t.boolean "old_show_submitted_story_threads", default: true
|
|
||||||
t.datetime "disabled_invite_at"
|
t.datetime "disabled_invite_at"
|
||||||
t.integer "disabled_invite_by_user_id"
|
t.integer "disabled_invite_by_user_id"
|
||||||
t.string "disabled_invite_reason", limit: 200
|
t.string "disabled_invite_reason", limit: 200
|
||||||
t.text "settings"
|
t.text "settings"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue