diff --git a/app/models/collection.rb b/app/models/collection.rb index 4c8a3c02..12c072f5 100644 --- a/app/models/collection.rb +++ b/app/models/collection.rb @@ -46,6 +46,8 @@ # * **`identifier`** # * `index_collections_on_operator_id`: # * **`operator_id`** +# * `index_collections_on_private`: +# * **`private`** # * `index_collections_on_university_id`: # * **`university_id`** # diff --git a/app/models/item.rb b/app/models/item.rb index 5df36ea4..9ace0146 100644 --- a/app/models/item.rb +++ b/app/models/item.rb @@ -51,6 +51,10 @@ # * **`access_condition_id`** # * `index_items_on_collection_id`: # * **`collection_id`** +# * `index_items_on_collection_id_and_private_and_updated_at`: +# * **`collection_id`** +# * **`private`** +# * **`updated_at`** # * `index_items_on_collector_id`: # * **`collector_id`** # * `index_items_on_discourse_type_id`: diff --git a/db/cache_schema.rb b/db/cache_schema.rb index 6005a297..3cde10c9 100644 --- a/db/cache_schema.rb +++ b/db/cache_schema.rb @@ -1,12 +1,22 @@ -# frozen_string_literal: true +# 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.2].define(version: 1) do - create_table "solid_cache_entries", force: :cascade do |t| +ActiveRecord::Schema[8.0].define(version: 1) do + create_table "solid_cache_entries", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.binary "key", limit: 1024, null: false - t.binary "value", limit: 536870912, null: false + t.binary "value", size: :long, null: false t.datetime "created_at", null: false - t.integer "key_hash", limit: 8, null: false - t.integer "byte_size", limit: 4, null: false + t.bigint "key_hash", null: false + t.integer "byte_size", null: false t.index ["byte_size"], name: "index_solid_cache_entries_on_byte_size" t.index ["key_hash", "byte_size"], name: "index_solid_cache_entries_on_key_hash_and_byte_size" t.index ["key_hash"], name: "index_solid_cache_entries_on_key_hash", unique: true diff --git a/db/queue_schema.rb b/db/queue_schema.rb index eae62180..7995aa1f 100644 --- a/db/queue_schema.rb +++ b/db/queue_schema.rb @@ -1,4 +1,16 @@ -ActiveRecord::Schema[7.1].define(version: 1) do +# 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[8.0].define(version: 2024_09_04_193154) do create_table "solid_queue_blocked_executions", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.bigint "job_id", null: false t.string "queue_name", null: false diff --git a/db/schema.rb b/db/schema.rb index 98bff8cd..73644cc7 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.2].define(version: 2024_10_19_010838) do +ActiveRecord::Schema[8.0].define(version: 2024_12_02_233312) do create_table "access_conditions", id: :integer, charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.string "name" t.datetime "created_at", precision: nil, null: false @@ -95,6 +95,7 @@ t.index ["field_of_research_id"], name: "index_collections_on_field_of_research_id" t.index ["identifier"], name: "index_collections_on_identifier", unique: true t.index ["operator_id"], name: "index_collections_on_operator_id" + t.index ["private"], name: "index_collections_on_private" t.index ["university_id"], name: "index_collections_on_university_id" end @@ -289,6 +290,7 @@ t.string "doi" t.integer "essences_count" t.index ["access_condition_id"], name: "index_items_on_access_condition_id" + t.index ["collection_id", "private", "updated_at"], name: "index_items_on_collection_id_and_private_and_updated_at" t.index ["collection_id"], name: "index_items_on_collection_id" t.index ["collector_id"], name: "index_items_on_collector_id" t.index ["discourse_type_id"], name: "index_items_on_discourse_type_id" diff --git a/spec/models/collection_spec.rb b/spec/models/collection_spec.rb index 040213d4..84b7e16a 100644 --- a/spec/models/collection_spec.rb +++ b/spec/models/collection_spec.rb @@ -46,6 +46,8 @@ # * **`identifier`** # * `index_collections_on_operator_id`: # * **`operator_id`** +# * `index_collections_on_private`: +# * **`private`** # * `index_collections_on_university_id`: # * **`university_id`** # diff --git a/spec/models/item_spec.rb b/spec/models/item_spec.rb index 2c0e26d6..20a140a3 100644 --- a/spec/models/item_spec.rb +++ b/spec/models/item_spec.rb @@ -51,6 +51,10 @@ # * **`access_condition_id`** # * `index_items_on_collection_id`: # * **`collection_id`** +# * `index_items_on_collection_id_and_private_and_updated_at`: +# * **`collection_id`** +# * **`private`** +# * **`updated_at`** # * `index_items_on_collector_id`: # * **`collector_id`** # * `index_items_on_discourse_type_id`: