|
|
@@ -10,7 +10,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[8.0].define(version: 2026_04_19_035400) do |
|
|
|
|
|
|
|
|
ActiveRecord::Schema[8.0].define(version: 2026_04_26_120600) do |
|
|
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
t.string "name", null: false |
|
|
t.string "name", null: false |
|
|
t.string "record_type", null: false |
|
|
t.string "record_type", null: false |
|
|
@@ -354,6 +354,7 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_19_035400) do |
|
|
|
|
|
|
|
|
create_table "wiki_pages", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
create_table "wiki_pages", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
t.bigint "tag_name_id", null: false |
|
|
t.bigint "tag_name_id", null: false |
|
|
|
|
|
t.text "body", null: false |
|
|
t.bigint "created_user_id", null: false |
|
|
t.bigint "created_user_id", null: false |
|
|
t.bigint "updated_user_id", null: false |
|
|
t.bigint "updated_user_id", null: false |
|
|
t.datetime "created_at", null: false |
|
|
t.datetime "created_at", null: false |
|
|
@@ -396,6 +397,22 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_19_035400) do |
|
|
t.index ["wiki_page_id"], name: "index_wiki_revisions_on_wiki_page_id" |
|
|
t.index ["wiki_page_id"], name: "index_wiki_revisions_on_wiki_page_id" |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
create_table "wiki_versions", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
|
|
t.bigint "wiki_page_id", null: false |
|
|
|
|
|
t.integer "version_no", null: false |
|
|
|
|
|
t.string "event_type", null: false |
|
|
|
|
|
t.string "title", null: false |
|
|
|
|
|
t.text "body", null: false |
|
|
|
|
|
t.text "reason" |
|
|
|
|
|
t.datetime "created_at", null: false |
|
|
|
|
|
t.bigint "created_by_user_id" |
|
|
|
|
|
t.index ["created_by_user_id"], name: "index_wiki_versions_on_created_by_user_id" |
|
|
|
|
|
t.index ["wiki_page_id", "version_no"], name: "index_wiki_versions_on_wiki_page_id_and_version_no", unique: true |
|
|
|
|
|
t.index ["wiki_page_id"], name: "index_wiki_versions_on_wiki_page_id" |
|
|
|
|
|
t.check_constraint "`event_type` in (_utf8mb4'create',_utf8mb4'update',_utf8mb4'discard',_utf8mb4'restore')", name: "wiki_versions_event_type_valid" |
|
|
|
|
|
t.check_constraint "`version_no` > 0", name: "wiki_versions_version_no_positive" |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" |
|
|
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id" |
|
|
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" |
|
|
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id" |
|
|
add_foreign_key "material_versions", "materials" |
|
|
add_foreign_key "material_versions", "materials" |
|
|
@@ -453,4 +470,6 @@ ActiveRecord::Schema[8.0].define(version: 2026_04_19_035400) do |
|
|
add_foreign_key "wiki_revisions", "wiki_pages" |
|
|
add_foreign_key "wiki_revisions", "wiki_pages" |
|
|
add_foreign_key "wiki_revisions", "wiki_pages", column: "redirect_page_id" |
|
|
add_foreign_key "wiki_revisions", "wiki_pages", column: "redirect_page_id" |
|
|
add_foreign_key "wiki_revisions", "wiki_revisions", column: "base_revision_id" |
|
|
add_foreign_key "wiki_revisions", "wiki_revisions", column: "base_revision_id" |
|
|
|
|
|
add_foreign_key "wiki_versions", "users", column: "created_by_user_id" |
|
|
|
|
|
add_foreign_key "wiki_versions", "wiki_pages" |
|
|
end |
|
|
end |