diff --git a/app/models/query_doc_pair.rb b/app/models/query_doc_pair.rb index fe9dd665e..ae521b471 100644 --- a/app/models/query_doc_pair.rb +++ b/app/models/query_doc_pair.rb @@ -5,7 +5,7 @@ # Table name: query_doc_pairs # # id :bigint not null, primary key -# document_fields :text(65535) +# document_fields :text(16777215) # information_need :string(255) # notes :text(65535) # options :text(65535) diff --git a/db/migrate/20240124224447_resize_query_d_oc_doc_fields_to_match_snapshot_fields.rb b/db/migrate/20240124224447_resize_query_d_oc_doc_fields_to_match_snapshot_fields.rb new file mode 100644 index 000000000..d9d5ef3cc --- /dev/null +++ b/db/migrate/20240124224447_resize_query_d_oc_doc_fields_to_match_snapshot_fields.rb @@ -0,0 +1,7 @@ +class ResizeQueryDOcDocFieldsToMatchSnapshotFields < ActiveRecord::Migration[7.1] + # discovered that we limit this to TEXT, not MEDIUMTEXT, however + # in SnapshotDocs.fields it IS a MEDIUMTEXT field. + def change + change_column :query_doc_pairs, :document_fields, :mediumtext + end +end diff --git a/db/schema.rb b/db/schema.rb index 468ed8979..75628d23d 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.1].define(version: 2024_01_22_154641) do +ActiveRecord::Schema[7.1].define(version: 2024_01_24_224447) do create_table "active_storage_attachments", charset: "utf8mb4", collation: "utf8mb4_bin", force: :cascade do |t| t.string "name", null: false t.string "record_type", null: false @@ -167,7 +167,7 @@ create_table "query_doc_pairs", charset: "utf8mb3", collation: "utf8mb3_unicode_ci", force: :cascade do |t| t.string "query_text", limit: 500 t.integer "position" - t.text "document_fields" + t.text "document_fields", size: :medium t.bigint "book_id", null: false t.datetime "created_at", null: false t.datetime "updated_at", null: false diff --git a/test/fixtures/query_doc_pairs.yml b/test/fixtures/query_doc_pairs.yml index b1bfa8bd6..59e7a4428 100644 --- a/test/fixtures/query_doc_pairs.yml +++ b/test/fixtures/query_doc_pairs.yml @@ -3,7 +3,7 @@ # Table name: query_doc_pairs # # id :bigint not null, primary key -# document_fields :text(65535) +# document_fields :text(16777215) # information_need :string(255) # notes :text(65535) # options :text(65535) diff --git a/test/models/query_doc_pair_test.rb b/test/models/query_doc_pair_test.rb index f5d62e481..3817c3771 100644 --- a/test/models/query_doc_pair_test.rb +++ b/test/models/query_doc_pair_test.rb @@ -5,7 +5,7 @@ # Table name: query_doc_pairs # # id :bigint not null, primary key -# document_fields :text(65535) +# document_fields :text(16777215) # information_need :string(255) # notes :text(65535) # options :text(65535)