|
|
@@ -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: 2025_09_09_075500) do |
|
|
|
|
|
|
|
|
ActiveRecord::Schema[8.0].define(version: 2025_11_26_231500) 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 |
|
|
@@ -40,7 +40,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_09_075500) do |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
create_table "ip_addresses", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
create_table "ip_addresses", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
t.binary "ip_adress", limit: 16, null: false |
|
|
|
|
|
|
|
|
t.binary "ip_address", limit: 16, null: false |
|
|
t.boolean "banned", default: false, null: false |
|
|
t.boolean "banned", default: false, null: false |
|
|
t.datetime "created_at", null: false |
|
|
t.datetime "created_at", null: false |
|
|
t.datetime "updated_at", null: false |
|
|
t.datetime "updated_at", null: false |
|
|
@@ -70,9 +70,16 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_09_075500) do |
|
|
t.bigint "deleted_user_id" |
|
|
t.bigint "deleted_user_id" |
|
|
t.datetime "created_at", null: false |
|
|
t.datetime "created_at", null: false |
|
|
t.datetime "updated_at", null: false |
|
|
t.datetime "updated_at", null: false |
|
|
|
|
|
t.datetime "discarded_at" |
|
|
|
|
|
t.virtual "is_active", type: :boolean, as: "(`discarded_at` is null)", stored: true |
|
|
|
|
|
t.virtual "active_unique_key", type: :string, as: "(case when (`discarded_at` is null) then concat(`post_id`,_utf8mb4':',`tag_id`) else NULL end)", stored: true |
|
|
|
|
|
t.index ["active_unique_key"], name: "idx_post_tags_active_unique", unique: true |
|
|
t.index ["created_user_id"], name: "index_post_tags_on_created_user_id" |
|
|
t.index ["created_user_id"], name: "index_post_tags_on_created_user_id" |
|
|
t.index ["deleted_user_id"], name: "index_post_tags_on_deleted_user_id" |
|
|
t.index ["deleted_user_id"], name: "index_post_tags_on_deleted_user_id" |
|
|
|
|
|
t.index ["discarded_at"], name: "index_post_tags_on_discarded_at" |
|
|
|
|
|
t.index ["post_id", "discarded_at"], name: "index_post_tags_on_post_id_and_discarded_at" |
|
|
t.index ["post_id"], name: "index_post_tags_on_post_id" |
|
|
t.index ["post_id"], name: "index_post_tags_on_post_id" |
|
|
|
|
|
t.index ["tag_id", "discarded_at"], name: "index_post_tags_on_tag_id_and_discarded_at" |
|
|
t.index ["tag_id"], name: "index_post_tags_on_tag_id" |
|
|
t.index ["tag_id"], name: "index_post_tags_on_tag_id" |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
@@ -107,6 +114,15 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_09_075500) do |
|
|
t.index ["tag_id"], name: "index_tag_aliases_on_tag_id" |
|
|
t.index ["tag_id"], name: "index_tag_aliases_on_tag_id" |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
create_table "tag_implications", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
|
|
|
t.bigint "tag_id", null: false |
|
|
|
|
|
t.bigint "parent_tag_id", null: false |
|
|
|
|
|
t.datetime "created_at", null: false |
|
|
|
|
|
t.datetime "updated_at", null: false |
|
|
|
|
|
t.index ["parent_tag_id"], name: "index_tag_implications_on_parent_tag_id" |
|
|
|
|
|
t.index ["tag_id"], name: "index_tag_implications_on_tag_id" |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
create_table "tag_similarities", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
create_table "tag_similarities", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| |
|
|
t.bigint "tag_id", null: false |
|
|
t.bigint "tag_id", null: false |
|
|
t.bigint "target_tag_id", null: false |
|
|
t.bigint "target_tag_id", null: false |
|
|
@@ -176,6 +192,8 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_09_075500) do |
|
|
add_foreign_key "posts", "users", column: "uploaded_user_id" |
|
|
add_foreign_key "posts", "users", column: "uploaded_user_id" |
|
|
add_foreign_key "settings", "users" |
|
|
add_foreign_key "settings", "users" |
|
|
add_foreign_key "tag_aliases", "tags" |
|
|
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_similarities", "tags" |
|
|
add_foreign_key "tag_similarities", "tags" |
|
|
add_foreign_key "tag_similarities", "tags", column: "target_tag_id" |
|
|
add_foreign_key "tag_similarities", "tags", column: "target_tag_id" |
|
|
add_foreign_key "user_ips", "ip_addresses" |
|
|
add_foreign_key "user_ips", "ip_addresses" |
|
|
|