From 7a6e73db20f4cb344041522e8252fd8956a6e877 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Tue, 15 May 2018 13:03:36 +0200 Subject: [PATCH 1/2] Remove file_id from structured_errors --- .../20180515110030_remove_file_id_from_structured_errors.rb | 5 +++++ db/schema.rb | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20180515110030_remove_file_id_from_structured_errors.rb diff --git a/db/migrate/20180515110030_remove_file_id_from_structured_errors.rb b/db/migrate/20180515110030_remove_file_id_from_structured_errors.rb new file mode 100644 index 00000000..d5465ccd --- /dev/null +++ b/db/migrate/20180515110030_remove_file_id_from_structured_errors.rb @@ -0,0 +1,5 @@ +class RemoveFileIdFromStructuredErrors < ActiveRecord::Migration + def change + remove_column :structured_errors, :file_id + end +end diff --git a/db/schema.rb b/db/schema.rb index 55339422..73a2c228 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180226131340) do +ActiveRecord::Schema.define(version: 20180515110030) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -325,7 +325,6 @@ ActiveRecord::Schema.define(version: 20180226131340) do create_table "structured_errors", force: :cascade do |t| t.integer "error_template_id" - t.integer "file_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false t.integer "submission_id" From 4382e9f0a5982f30ea4cce6fef5a7f5ac15e9910 Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Tue, 15 May 2018 13:43:50 +0200 Subject: [PATCH 2/2] Fix structured error factory --- test/factories/structured_errors.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/factories/structured_errors.rb b/test/factories/structured_errors.rb index 041b4bbd..10fc3d23 100644 --- a/test/factories/structured_errors.rb +++ b/test/factories/structured_errors.rb @@ -1,6 +1,6 @@ FactoryBot.define do factory :structured_error do error_template nil - file nil + submission nil end end