# This file is auto-generated from the current state of the database. Instead # of editing this file, please use the migrations feature of Active Record to # incrementally modify your database, and then regenerate this schema definition. # # This file is the source Rails uses to define your schema when running `bin/rails # db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to # be faster and is potentially less error prone than running all of your # migrations from scratch. Old migrations may fail to apply correctly if those # migrations use external dependencies or application code. # # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema[7.0].define(version: 2025_01_03_191134) do create_table "active_storage_attachments", charset: "utf8", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false t.bigint "record_id", null: false t.bigint "blob_id", null: false t.datetime "created_at", precision: nil, null: false t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id" t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true end create_table "active_storage_blobs", charset: "utf8", force: :cascade do |t| t.string "key", null: false t.string "filename", null: false t.string "content_type" t.text "metadata" t.string "service_name", null: false t.bigint "byte_size", null: false t.string "checksum", null: false t.datetime "created_at", precision: nil, null: false t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true end create_table "active_storage_variant_records", charset: "utf8", force: :cascade do |t| t.bigint "blob_id", null: false t.string "variation_digest", null: false t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true end create_table "admins", charset: "utf8", force: :cascade do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false t.string "reset_password_token" t.datetime "reset_password_sent_at", precision: nil t.datetime "remember_created_at", precision: nil t.integer "sign_in_count", default: 0, null: false t.datetime "current_sign_in_at", precision: nil t.datetime "last_sign_in_at", precision: nil t.string "current_sign_in_ip" t.string "last_sign_in_ip" t.string "confirmation_token" t.datetime "confirmed_at", precision: nil t.datetime "confirmation_sent_at", precision: nil t.string "unconfirmed_email" t.integer "failed_attempts", default: 0, null: false t.string "unlock_token" t.datetime "locked_at", precision: nil t.string "first_name" t.string "last_name" t.boolean "admin" t.boolean "designer" t.boolean "content_editor" t.integer "site_id" t.integer "updated_by_id" t.text "notes" t.datetime "created_at", precision: nil, null: false t.datetime "updated_at", precision: nil, null: false end create_table "admins_sites", charset: "utf8", force: :cascade do |t| t.integer "admin_id", null: false t.integer "site_id", null: false t.index ["admin_id"], name: "index_admins_sites_on_admin_id" t.index ["site_id"], name: "index_admins_sites_on_site_id" end create_table "assets", charset: "utf8", force: :cascade do |t| t.string "caption" t.string "title" t.string "asset_file_name" t.string "asset_content_type" t.integer "asset_file_size" t.integer "created_by_id" t.integer "updated_by_id" t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.string "uuid" t.integer "original_width" t.integer "original_height" t.string "original_extension" end create_table "config", charset: "utf8", force: :cascade do |t| t.string "key", limit: 40, default: "", null: false t.string "value", default: "" t.index ["key"], name: "key", unique: true end create_table "extension_meta", charset: "utf8", force: :cascade do |t| t.string "name" t.integer "schema_version", default: 0 t.boolean "enabled", default: true end create_table "layouts", charset: "utf8", force: :cascade do |t| t.string "name", limit: 100 t.text "content" t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.integer "created_by_id" t.integer "updated_by_id" t.string "content_type", limit: 40 t.integer "lock_version", default: 0 t.integer "site_id" end create_table "page_attachments", charset: "utf8", force: :cascade do |t| t.integer "asset_id" t.integer "page_id" t.integer "position" end create_table "page_fields", charset: "utf8", force: :cascade do |t| t.integer "page_id" t.string "name" t.string "content" t.index ["page_id", "name", "content"], name: "index_page_fields_on_page_id_and_name_and_content" end create_table "page_parts", charset: "utf8", force: :cascade do |t| t.string "name", limit: 100 t.string "filter_id", limit: 25 t.text "content", size: :medium t.integer "page_id" t.index ["page_id", "name"], name: "parts_by_page" end create_table "pages", charset: "utf8", force: :cascade do |t| t.string "title" t.string "slug", limit: 100 t.string "breadcrumb", limit: 160 t.string "class_name", limit: 25 t.integer "status_id", default: 1, null: false t.integer "parent_id" t.integer "layout_id" t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.datetime "published_at", precision: nil t.integer "created_by_id" t.integer "updated_by_id" t.boolean "virtual", default: false, null: false t.integer "lock_version", default: 0 t.integer "site_id" t.text "allowed_children_cache" t.integer "position" t.index ["class_name"], name: "pages_class_name" t.index ["parent_id"], name: "pages_parent_id" t.index ["site_id"], name: "index_pages_on_site_id" t.index ["slug", "parent_id"], name: "pages_child_slug" t.index ["virtual", "status_id"], name: "pages_published" end create_table "sessions", charset: "utf8", force: :cascade do |t| t.string "session_id" t.text "data" t.datetime "updated_at", precision: nil t.index ["session_id"], name: "index_sessions_on_session_id" t.index ["updated_at"], name: "index_sessions_on_updated_at" end create_table "sites", charset: "utf8", force: :cascade do |t| t.string "name" t.string "domain" t.integer "homepage_id" t.integer "position", default: 0 t.integer "created_by_id" t.datetime "created_at", precision: nil t.integer "updated_by_id" t.datetime "updated_at", precision: nil t.string "subtitle" t.string "abbreviation" t.string "base_domain" end create_table "snippets", charset: "utf8", force: :cascade do |t| t.string "name", limit: 100, default: "", null: false t.string "filter_id", limit: 25 t.text "content" t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.integer "created_by_id" t.integer "updated_by_id" t.integer "lock_version", default: 0 t.integer "site_id" t.index ["name", "site_id"], name: "name_site_id", unique: true end create_table "users", charset: "utf8", force: :cascade do |t| t.string "name", limit: 100 t.string "email" t.string "login", limit: 40, default: "", null: false t.string "password", limit: 40 t.boolean "admin", default: false, null: false t.boolean "designer", default: false, null: false t.datetime "created_at", precision: nil t.datetime "updated_at", precision: nil t.integer "created_by_id" t.integer "updated_by_id" t.string "salt" t.text "notes" t.integer "lock_version", default: 0 t.string "session_token" t.integer "site_id" t.string "locale" t.string "password_reset_token" t.datetime "password_reset_sent_at", precision: nil end create_table "version_associations", charset: "utf8", force: :cascade do |t| t.integer "version_id" t.string "foreign_key_name", null: false t.integer "foreign_key_id" t.string "foreign_type" t.index ["foreign_key_name", "foreign_key_id", "foreign_type"], name: "index_version_associations_on_foreign_key" t.index ["version_id"], name: "index_version_associations_on_version_id" end create_table "versions", charset: "utf8mb4", force: :cascade do |t| t.string "whodunnit" t.datetime "created_at" t.bigint "item_id", null: false t.string "item_type", limit: 191, null: false t.string "event", null: false t.text "object", size: :long t.integer "transaction_id" t.index ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id" t.index ["transaction_id"], name: "index_versions_on_transaction_id" end 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" end