|
|
|
@@ -10,7 +10,7 @@ |
|
|
|
# |
|
|
|
# It's strongly recommended that you check this file into your version control system. |
|
|
|
|
|
|
|
ActiveRecord::Schema[8.0].define(version: 2025_12_30_143400) do |
|
|
|
ActiveRecord::Schema[8.0].define(version: 2026_01_11_204400) 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 |
|
|
|
@@ -84,7 +84,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_30_143400) do |
|
|
|
end |
|
|
|
|
|
|
|
create_table "posts", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.string "title", null: false |
|
|
|
t.string "title" |
|
|
|
t.string "url", limit: 2000, null: false |
|
|
|
t.string "thumbnail_base", limit: 2000 |
|
|
|
t.bigint "parent_id" |
|
|
|
@@ -124,6 +124,15 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_30_143400) do |
|
|
|
t.index ["tag_id"], name: "index_tag_implications_on_tag_id" |
|
|
|
end |
|
|
|
|
|
|
|
create_table "tag_names", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.string "name", null: false |
|
|
|
t.bigint "canonical_id" |
|
|
|
t.datetime "created_at", null: false |
|
|
|
t.datetime "updated_at", null: false |
|
|
|
t.index ["canonical_id"], name: "index_tag_names_on_canonical_id" |
|
|
|
t.index ["name"], name: "index_tag_names_on_name", unique: true |
|
|
|
end |
|
|
|
|
|
|
|
create_table "tag_similarities", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.bigint "tag_id", null: false |
|
|
|
t.bigint "target_tag_id", null: false |
|
|
|
@@ -133,11 +142,12 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_30_143400) do |
|
|
|
end |
|
|
|
|
|
|
|
create_table "tags", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.string "name", null: false |
|
|
|
t.bigint "tag_name_id", null: false |
|
|
|
t.string "category", default: "general", null: false |
|
|
|
t.datetime "created_at", null: false |
|
|
|
t.datetime "updated_at", null: false |
|
|
|
t.integer "post_count", default: 0, null: false |
|
|
|
t.index ["tag_name_id"], name: "index_tags_on_tag_name_id", unique: true |
|
|
|
end |
|
|
|
|
|
|
|
create_table "user_ips", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
@@ -176,12 +186,13 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_30_143400) do |
|
|
|
end |
|
|
|
|
|
|
|
create_table "wiki_pages", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.string "title", null: false |
|
|
|
t.bigint "tag_name_id", null: false |
|
|
|
t.bigint "created_user_id", null: false |
|
|
|
t.bigint "updated_user_id", null: false |
|
|
|
t.datetime "created_at", null: false |
|
|
|
t.datetime "updated_at", null: false |
|
|
|
t.index ["created_user_id"], name: "index_wiki_pages_on_created_user_id" |
|
|
|
t.index ["tag_name_id"], name: "index_wiki_pages_on_tag_name_id", unique: true |
|
|
|
t.index ["updated_user_id"], name: "index_wiki_pages_on_updated_user_id" |
|
|
|
end |
|
|
|
|
|
|
|
@@ -231,12 +242,15 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_30_143400) do |
|
|
|
add_foreign_key "tag_aliases", "tags" |
|
|
|
add_foreign_key "tag_implications", "tags" |
|
|
|
add_foreign_key "tag_implications", "tags", column: "parent_tag_id" |
|
|
|
add_foreign_key "tag_names", "tag_names", column: "canonical_id" |
|
|
|
add_foreign_key "tag_similarities", "tags" |
|
|
|
add_foreign_key "tag_similarities", "tags", column: "target_tag_id" |
|
|
|
add_foreign_key "tags", "tag_names" |
|
|
|
add_foreign_key "user_ips", "ip_addresses" |
|
|
|
add_foreign_key "user_ips", "users" |
|
|
|
add_foreign_key "user_post_views", "posts" |
|
|
|
add_foreign_key "user_post_views", "users" |
|
|
|
add_foreign_key "wiki_pages", "tag_names" |
|
|
|
add_foreign_key "wiki_pages", "users", column: "created_user_id" |
|
|
|
add_foreign_key "wiki_pages", "users", column: "updated_user_id" |
|
|
|
add_foreign_key "wiki_revision_lines", "wiki_lines" |
|
|
|
|