diff --git a/app/controllers/dumps_controller.rb b/app/controllers/dumps_controller.rb new file mode 100644 index 000000000..80f2b2669 --- /dev/null +++ b/app/controllers/dumps_controller.rb @@ -0,0 +1,2 @@ +class DumpsController < ApplicationController +end diff --git a/app/helpers/dumps_helper.rb b/app/helpers/dumps_helper.rb new file mode 100644 index 000000000..d71fdb018 --- /dev/null +++ b/app/helpers/dumps_helper.rb @@ -0,0 +1,2 @@ +module DumpsHelper +end diff --git a/app/models/dump.rb b/app/models/dump.rb new file mode 100644 index 000000000..10ac3960e --- /dev/null +++ b/app/models/dump.rb @@ -0,0 +1,3 @@ +class Dump < ApplicationRecord + has_one_attached :file +end diff --git a/app/views/dumps/index.htrml.erb b/app/views/dumps/index.htrml.erb new file mode 100644 index 000000000..e69de29bb diff --git a/db/migrate/20260120032240_create_dumps.rb b/db/migrate/20260120032240_create_dumps.rb new file mode 100644 index 000000000..6e0053bf9 --- /dev/null +++ b/db/migrate/20260120032240_create_dumps.rb @@ -0,0 +1,10 @@ +class CreateDumps < ActiveRecord::Migration[7.2] + def change + create_table :dumps do |t| + t.string :title, null: false + t.string :comment + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 07e7a08a1..aa124a96e 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: 2025_12_21_142105) do +ActiveRecord::Schema[7.2].define(version: 2026_01_20_032240) do create_table "abilities", charset: "utf8mb4", collation: "utf8mb4_0900_ai_ci", force: :cascade do |t| t.bigint "community_id" t.string "name" @@ -267,6 +267,13 @@ t.index ["user_id"], name: "index_complaints_on_user_id" end + create_table "dumps", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t| + t.string "title", null: false + t.string "comment" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "email_logs", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t| t.string "log_type" t.string "destination" diff --git a/test/controllers/dumps_controller_test.rb b/test/controllers/dumps_controller_test.rb new file mode 100644 index 000000000..957059ef6 --- /dev/null +++ b/test/controllers/dumps_controller_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DumpsControllerTest < ActionDispatch::IntegrationTest + # test "the truth" do + # assert true + # end +end diff --git a/test/fixtures/dumps.yml b/test/fixtures/dumps.yml new file mode 100644 index 000000000..f6a49061e --- /dev/null +++ b/test/fixtures/dumps.yml @@ -0,0 +1,8 @@ +# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +without_comment: + title: Data dump without a comment + +with_comment: + title: Data dump with comment + comment: we decided to include a helpful comment this time diff --git a/test/models/dump_test.rb b/test/models/dump_test.rb new file mode 100644 index 000000000..3c9dab9a3 --- /dev/null +++ b/test/models/dump_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class DumpTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end