From becd09222db2446520e2500c276943e627bf31fb Mon Sep 17 00:00:00 2001 From: Jeff Marks Date: Mon, 17 Feb 2025 07:42:15 -0700 Subject: [PATCH 1/2] Migrations --- .../20250217143034_create_lcpe_preload_datasets.rb | 10 ++++++++++ db/migrate/20250217143740_rename_blob_on_upload.rb | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100755 db/migrate/20250217143034_create_lcpe_preload_datasets.rb create mode 100755 db/migrate/20250217143740_rename_blob_on_upload.rb diff --git a/db/migrate/20250217143034_create_lcpe_preload_datasets.rb b/db/migrate/20250217143034_create_lcpe_preload_datasets.rb new file mode 100755 index 000000000..30a3d06ac --- /dev/null +++ b/db/migrate/20250217143034_create_lcpe_preload_datasets.rb @@ -0,0 +1,10 @@ +class CreateLcpePreloadDatasets < ActiveRecord::Migration[7.1] + def change + create_table :lcpe_preload_datasets do |t| + t.text :body + t.string :subject_class + + t.timestamps + end + end +end diff --git a/db/migrate/20250217143740_rename_blob_on_upload.rb b/db/migrate/20250217143740_rename_blob_on_upload.rb new file mode 100755 index 000000000..96839ff28 --- /dev/null +++ b/db/migrate/20250217143740_rename_blob_on_upload.rb @@ -0,0 +1,6 @@ +class RenameBlobOnUpload < ActiveRecord::Migration[7.1] + def change + safety_assured { remove_column :uploads, :blob } + add_column :uploads, :body, :text + end +end From 4d0e77ee16ac7182bdf800844ae074886b8dfd46 Mon Sep 17 00:00:00 2001 From: Jeff Marks Date: Mon, 17 Feb 2025 09:16:55 -0700 Subject: [PATCH 2/2] schema --- db/schema.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/db/schema.rb b/db/schema.rb index 0314cec77..38c28cd7f 100755 --- 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: 2025_02_03_183542) do +ActiveRecord::Schema[7.1].define(version: 2025_02_17_143740) do # These are extensions that must be enabled in order to support this database enable_extension "cube" enable_extension "earthdistance" @@ -1438,6 +1438,13 @@ t.string "state" end + create_table "lcpe_preload_datasets", force: :cascade do |t| + t.text "body" + t.string "subject_class" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "mous", id: :serial, force: :cascade do |t| t.string "ope", null: false t.string "ope6", null: false @@ -1752,10 +1759,10 @@ t.datetime "updated_at", precision: nil, null: false t.datetime "completed_at", precision: nil t.boolean "multiple_file_upload", default: false - t.string "blob" t.string "status_message" t.datetime "queued_at", precision: nil t.datetime "canceled_at", precision: nil + t.text "body" t.index ["csv_type"], name: "index_uploads_on_csv_type" t.index ["updated_at"], name: "index_uploads_on_updated_at" t.index ["user_id"], name: "index_uploads_on_user_id"