From f1278a7f4874046742b0d713ea288fcfa8dde8ce Mon Sep 17 00:00:00 2001 From: Maximilian Grundke Date: Tue, 14 Aug 2018 17:55:17 +0200 Subject: [PATCH] Rename type column to category to avoid conflict with rails --- db/migrate/20180814154055_rename_events_type_to_category.rb | 5 +++++ db/schema.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 db/migrate/20180814154055_rename_events_type_to_category.rb diff --git a/db/migrate/20180814154055_rename_events_type_to_category.rb b/db/migrate/20180814154055_rename_events_type_to_category.rb new file mode 100644 index 00000000..f97200c8 --- /dev/null +++ b/db/migrate/20180814154055_rename_events_type_to_category.rb @@ -0,0 +1,5 @@ +class RenameEventsTypeToCategory < ActiveRecord::Migration + def change + rename_column :events, :type, :category + end +end diff --git a/db/schema.rb b/db/schema.rb index 872e6b82..bfa3ad66 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: 20180814145059) do +ActiveRecord::Schema.define(version: 20180814154055) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -96,7 +96,7 @@ ActiveRecord::Schema.define(version: 20180814145059) do add_index "errors", ["submission_id"], name: "index_errors_on_submission_id", using: :btree create_table "events", force: :cascade do |t| - t.string "type" + t.string "category" t.string "data" t.integer "user_id" t.string "user_type"