|
|
|
@@ -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_04_26_120600) do |
|
|
|
ActiveRecord::Schema[8.0].define(version: 2026_04_27_214800) 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 |
|
|
|
@@ -119,6 +119,15 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_26_120600) do |
|
|
|
t.check_constraint "`version_no` > 0", name: "nico_tag_versions_version_no_positive" |
|
|
|
end |
|
|
|
|
|
|
|
create_table "post_implications", primary_key: ["post_id", "parent_post_id"], charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.bigint "post_id", null: false |
|
|
|
t.bigint "parent_post_id", null: false |
|
|
|
t.datetime "created_at", null: false |
|
|
|
t.datetime "updated_at", null: false |
|
|
|
t.index ["parent_post_id"], name: "index_post_implications_on_parent_post_id" |
|
|
|
t.check_constraint "`post_id` <> `parent_post_id`", name: "chk_post_implications_no_self" |
|
|
|
end |
|
|
|
|
|
|
|
create_table "post_similarities", primary_key: ["post_id", "target_post_id"], charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
t.bigint "post_id", null: false |
|
|
|
t.bigint "target_post_id", null: false |
|
|
|
@@ -155,13 +164,12 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_26_120600) do |
|
|
|
t.string "url", limit: 768, null: false |
|
|
|
t.string "thumbnail_base", limit: 2000 |
|
|
|
t.text "tags", null: false |
|
|
|
t.bigint "parent_id" |
|
|
|
t.text "parent_post_ids", null: false |
|
|
|
t.datetime "original_created_from" |
|
|
|
t.datetime "original_created_before" |
|
|
|
t.datetime "created_at", null: false |
|
|
|
t.bigint "created_by_user_id" |
|
|
|
t.index ["created_by_user_id"], name: "index_post_versions_on_created_by_user_id" |
|
|
|
t.index ["parent_id"], name: "index_post_versions_on_parent_id" |
|
|
|
t.index ["post_id", "version_no"], name: "index_post_versions_on_post_id_and_version_no", unique: true |
|
|
|
t.index ["post_id"], name: "index_post_versions_on_post_id" |
|
|
|
t.check_constraint "`event_type` in (_utf8mb4'create',_utf8mb4'update',_utf8mb4'discard',_utf8mb4'restore')", name: "post_versions_event_type_valid" |
|
|
|
@@ -172,13 +180,11 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_26_120600) do |
|
|
|
t.string "title" |
|
|
|
t.string "url", limit: 768, null: false |
|
|
|
t.string "thumbnail_base", limit: 2000 |
|
|
|
t.bigint "parent_id" |
|
|
|
t.bigint "uploaded_user_id" |
|
|
|
t.datetime "created_at", null: false |
|
|
|
t.datetime "original_created_from" |
|
|
|
t.datetime "original_created_before" |
|
|
|
t.datetime "updated_at", null: false |
|
|
|
t.index ["parent_id"], name: "index_posts_on_parent_id" |
|
|
|
t.index ["uploaded_user_id"], name: "index_posts_on_uploaded_user_id" |
|
|
|
t.index ["url"], name: "index_posts_on_url", unique: true |
|
|
|
end |
|
|
|
@@ -428,6 +434,8 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_26_120600) do |
|
|
|
add_foreign_key "nico_tag_relations", "tags", column: "nico_tag_id" |
|
|
|
add_foreign_key "nico_tag_versions", "tags" |
|
|
|
add_foreign_key "nico_tag_versions", "users", column: "created_by_user_id" |
|
|
|
add_foreign_key "post_implications", "posts" |
|
|
|
add_foreign_key "post_implications", "posts", column: "parent_post_id" |
|
|
|
add_foreign_key "post_similarities", "posts" |
|
|
|
add_foreign_key "post_similarities", "posts", column: "target_post_id" |
|
|
|
add_foreign_key "post_tags", "posts" |
|
|
|
@@ -435,9 +443,7 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_26_120600) do |
|
|
|
add_foreign_key "post_tags", "users", column: "created_user_id" |
|
|
|
add_foreign_key "post_tags", "users", column: "deleted_user_id" |
|
|
|
add_foreign_key "post_versions", "posts" |
|
|
|
add_foreign_key "post_versions", "posts", column: "parent_id" |
|
|
|
add_foreign_key "post_versions", "users", column: "created_by_user_id" |
|
|
|
add_foreign_key "posts", "posts", column: "parent_id" |
|
|
|
add_foreign_key "posts", "users", column: "uploaded_user_id" |
|
|
|
add_foreign_key "settings", "users" |
|
|
|
add_foreign_key "tag_implications", "tags" |
|
|
|
|