Rename subscription#type to subscription_type to avoid rails stumbling over polymorphism

This commit is contained in:
Maximilian Grundke
2017-09-13 07:54:43 +02:00
parent 811fc72e1e
commit bb6c266b13
2 changed files with 7 additions and 2 deletions

View File

@ -0,0 +1,5 @@
class RenameSubscriptionType < ActiveRecord::Migration
def change
rename_column :subscriptions, :type, :subscription_type
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170906124500) do
ActiveRecord::Schema.define(version: 20170913054203) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -325,7 +325,7 @@ ActiveRecord::Schema.define(version: 20170906124500) do
t.integer "user_id"
t.string "user_type"
t.integer "request_for_comment_id"
t.string "type"
t.string "subscription_type"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end