このコミットが含まれているのは:
@@ -0,0 +1,53 @@
|
||||
class RebuildSettingsAsTypedUserSettings < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
remove_foreign_key :settings, :users if foreign_key_exists?(:settings, :users)
|
||||
remove_index :settings, :user_id if index_exists?(:settings, :user_id)
|
||||
|
||||
remove_column :settings, :key, :string if column_exists?(:settings, :key)
|
||||
remove_column :settings, :value, :json if column_exists?(:settings, :value)
|
||||
|
||||
change_column_null :settings, :user_id, false
|
||||
|
||||
add_column :settings, :theme, :string, null: false, default: 'system'
|
||||
add_column :settings,
|
||||
:display_density,
|
||||
:string,
|
||||
null: false,
|
||||
default: 'comfortable'
|
||||
add_column :settings, :font_size, :string, null: false, default: 'normal'
|
||||
add_column :settings, :post_list_limit, :integer, null: false, default: 50
|
||||
add_column :settings,
|
||||
:post_list_order,
|
||||
:string,
|
||||
null: false,
|
||||
default: 'created_at_desc'
|
||||
add_column :settings,
|
||||
:viewed_post_display,
|
||||
:string,
|
||||
null: false,
|
||||
default: 'show'
|
||||
add_column :settings,
|
||||
:tag_autocomplete_nico,
|
||||
:boolean,
|
||||
null: false,
|
||||
default: true
|
||||
add_column :settings,
|
||||
:auto_fetch_title,
|
||||
:string,
|
||||
null: false,
|
||||
default: 'manual'
|
||||
add_column :settings,
|
||||
:auto_fetch_thumbnail,
|
||||
:string,
|
||||
null: false,
|
||||
default: 'manual'
|
||||
add_column :settings,
|
||||
:wiki_editor_mode,
|
||||
:string,
|
||||
null: false,
|
||||
default: 'split'
|
||||
|
||||
add_index :settings, :user_id, unique: true
|
||||
add_foreign_key :settings, :users
|
||||
end
|
||||
end
|
||||
生成ファイル
+12
-4
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_06_26_010000) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_07_04_000000) do
|
||||
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
@@ -374,11 +374,19 @@ ActiveRecord::Schema[8.0].define(version: 2026_06_26_010000) do
|
||||
|
||||
create_table "settings", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.bigint "user_id", null: false
|
||||
t.string "key", null: false
|
||||
t.json "value", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["user_id"], name: "index_settings_on_user_id"
|
||||
t.string "theme", default: "system", null: false
|
||||
t.string "display_density", default: "comfortable", null: false
|
||||
t.string "font_size", default: "normal", null: false
|
||||
t.integer "post_list_limit", default: 50, null: false
|
||||
t.string "post_list_order", default: "created_at_desc", null: false
|
||||
t.string "viewed_post_display", default: "show", null: false
|
||||
t.boolean "tag_autocomplete_nico", default: true, null: false
|
||||
t.string "auto_fetch_title", default: "manual", null: false
|
||||
t.string "auto_fetch_thumbnail", default: "manual", null: false
|
||||
t.string "wiki_editor_mode", default: "split", null: false
|
||||
t.index ["user_id"], name: "index_settings_on_user_id", unique: true
|
||||
end
|
||||
|
||||
create_table "tag_implications", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
|
||||
新しい課題から参照
ユーザをブロックする