Reviewed-on: #421 Co-authored-by: miteruzo <miteruzo@naver.com>
このコミットはプルリクエスト #421 でマージされました。
このコミットが含まれているのは:
生成ファイル
+61
-2
@@ -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_09_21_230000) do
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_09_22_040000) 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
|
||||
@@ -138,6 +138,29 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_230000) do
|
||||
t.index ["ip_address"], name: "index_ip_addresses_on_ip_address", unique: true
|
||||
end
|
||||
|
||||
create_table "languages", primary_key: "code", id: { type: :string, limit: 16 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.datetime "deprecated_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["deprecated_at"], name: "index_languages_on_deprecated_at"
|
||||
end
|
||||
|
||||
create_table "locales", primary_key: "code", id: { type: :string, limit: 32 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.string "language_code", limit: 16, null: false
|
||||
t.string "script_code", limit: 4, null: false
|
||||
t.integer "region_code", limit: 2, null: false
|
||||
t.string "variants", default: "", null: false
|
||||
t.string "name", null: false
|
||||
t.datetime "deprecated_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["deprecated_at"], name: "index_locales_on_deprecated_at"
|
||||
t.index ["language_code", "script_code", "region_code", "variants"], name: "idx_on_language_code_script_code_region_code_varian_b0ba85c39a", unique: true
|
||||
t.index ["language_code"], name: "index_locales_on_language_code"
|
||||
t.index ["region_code"], name: "fk_rails_175159992c"
|
||||
t.index ["script_code"], name: "fk_rails_0b74ce96a8"
|
||||
t.check_constraint "regexp_like(`variants`,_utf8mb4'^((([a-z0-9]{5,8}|[0-9][a-z0-9]{3})(-([a-z0-9]{5,8}|[0-9][a-z0-9]{3}))*(-x(-[a-z0-9]{1,8})+)?)|(x(-[a-z0-9]{1,8})+))?$',_utf8mb4'c')", name: "locales_variants_check"
|
||||
end
|
||||
|
||||
create_table "material_export_items", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.bigint "material_id", null: false
|
||||
t.string "profile", default: "legacy_drive", null: false
|
||||
@@ -388,6 +411,24 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_230000) do
|
||||
t.check_constraint "`version_no` > 0", name: "chk_posts_version_no_positive"
|
||||
end
|
||||
|
||||
create_table "regions", primary_key: "code", id: { type: :integer, limit: 2 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.string "alpha_code", limit: 2
|
||||
t.string "name", null: false
|
||||
t.datetime "deprecated_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["alpha_code"], name: "index_regions_on_alpha_code", unique: true
|
||||
t.index ["deprecated_at"], name: "index_regions_on_deprecated_at"
|
||||
t.check_constraint "regexp_like(`alpha_code`,_utf8mb4'^[A-Z]{2}$',_utf8mb4'c')", name: "regions_alpha_code_check"
|
||||
end
|
||||
|
||||
create_table "scripts", primary_key: "code", id: { type: :string, limit: 4 }, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.datetime "deprecated_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["deprecated_at"], name: "index_scripts_on_deprecated_at"
|
||||
t.check_constraint "regexp_like(`code`,_utf8mb4'^[A-Z][a-z]{3}$',_utf8mb4'c')", name: "scripts_code_check"
|
||||
end
|
||||
|
||||
create_table "settings", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.bigint "user_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
@@ -420,12 +461,22 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_230000) do
|
||||
end
|
||||
|
||||
create_table "tag_names", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
t.bigint "tag_id"
|
||||
t.string "language_code", limit: 16, null: false
|
||||
t.string "name", null: false
|
||||
t.string "script_code", limit: 4, null: false
|
||||
t.boolean "primary_flg", null: false
|
||||
t.boolean "auto_generated", default: false, null: false
|
||||
t.bigint "canonical_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.virtual "primary_tag_id", type: :bigint, as: "(case when `primary_flg` then `tag_id` else NULL end)"
|
||||
t.index ["canonical_id"], name: "index_tag_names_on_canonical_id"
|
||||
t.index ["name"], name: "index_tag_names_on_name", unique: true
|
||||
t.index ["language_code", "name"], name: "index_tag_names_on_language_code_and_name", unique: true
|
||||
t.index ["primary_tag_id", "language_code"], name: "index_tag_names_on_primary_tag_id_and_language_code", unique: true
|
||||
t.index ["script_code"], name: "fk_rails_dd783b3d1c"
|
||||
t.index ["tag_id"], name: "index_tag_names_on_tag_id"
|
||||
t.check_constraint "(0 <> `primary_flg`) or (0 = `auto_generated`)", name: "chk_tag_names_auto_generated_primary"
|
||||
end
|
||||
|
||||
create_table "tag_similarities", primary_key: ["tag_id", "target_tag_id"], charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
@@ -447,11 +498,13 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_230000) do
|
||||
t.datetime "deprecated_at"
|
||||
t.datetime "created_at", null: false
|
||||
t.bigint "created_by_user_id"
|
||||
t.json "names", null: false
|
||||
t.index ["created_at"], name: "index_tag_versions_on_created_at"
|
||||
t.index ["created_by_user_id", "created_at"], name: "index_tag_versions_on_created_by_user_id_and_created_at", order: { created_at: :desc }
|
||||
t.index ["tag_id", "created_at"], name: "index_tag_versions_on_tag_id_and_created_at", order: { created_at: :desc }
|
||||
t.index ["tag_id", "version_no"], name: "index_tag_versions_on_tag_id_and_version_no", unique: true
|
||||
t.check_constraint "`version_no` > 0", name: "tag_versions_version_no_positive"
|
||||
t.check_constraint "json_schema_valid(_utf8mb4'{\"type\":\"object\",\"minProperties\":1,\"patternProperties\":{\"^.{1,16}$\":{\"type\":\"object\",\"required\":[\"name\",\"script_code\",\"auto_generated\",\"aliases\"],\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255},\"script_code\":{\"type\":\"string\",\"pattern\":\"^[A-Z][a-z]{3}$\"},\"auto_generated\":{\"type\":\"boolean\"},\"aliases\":{\"type\":\"array\",\"uniqueItems\":true,\"items\":{\"type\":\"object\",\"required\":[\"name\",\"script_code\"],\"properties\":{\"name\":{\"type\":\"string\",\"minLength\":1,\"maxLength\":255},\"script_code\":{\"type\":\"string\",\"pattern\":\"^[A-Z][a-z]{3}$\"}},\"additionalProperties\":false}}},\"additionalProperties\":false}},\"additionalProperties\":false}',`names`)", name: "chk_tag_versions_names_schema"
|
||||
end
|
||||
|
||||
create_table "tags", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t|
|
||||
@@ -701,6 +754,9 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_230000) do
|
||||
add_foreign_key "gekanator_question_suggestions", "users"
|
||||
add_foreign_key "gekanator_questions", "gekanator_question_suggestions"
|
||||
add_foreign_key "gekanator_questions", "users", column: "created_by_id"
|
||||
add_foreign_key "locales", "languages", column: "language_code", primary_key: "code"
|
||||
add_foreign_key "locales", "regions", column: "region_code", primary_key: "code"
|
||||
add_foreign_key "locales", "scripts", column: "script_code", primary_key: "code"
|
||||
add_foreign_key "material_export_items", "materials"
|
||||
add_foreign_key "material_export_items", "users", column: "created_by_user_id"
|
||||
add_foreign_key "material_import_blocks", "users", column: "created_by_user_id"
|
||||
@@ -734,7 +790,10 @@ ActiveRecord::Schema[8.0].define(version: 2026_09_21_230000) do
|
||||
add_foreign_key "settings", "users"
|
||||
add_foreign_key "tag_implications", "tags"
|
||||
add_foreign_key "tag_implications", "tags", column: "parent_tag_id"
|
||||
add_foreign_key "tag_names", "languages", column: "language_code", primary_key: "code"
|
||||
add_foreign_key "tag_names", "scripts", column: "script_code", primary_key: "code"
|
||||
add_foreign_key "tag_names", "tag_names", column: "canonical_id"
|
||||
add_foreign_key "tag_names", "tags"
|
||||
add_foreign_key "tag_similarities", "tags"
|
||||
add_foreign_key "tag_similarities", "tags", column: "target_tag_id"
|
||||
add_foreign_key "tag_versions", "users", column: "created_by_user_id"
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする