docbrown/db/migrate/20180608195204_change_notes_to_polymorphic.rb
Andy Zhao ecbb9d4ab1 [Done] New Reporting System MVP (#408)
* Move validations from controller to model

* Add new columns to feedback message model

* Use polymorphic notes relationship

* MVP of ticketing system

* Use new URL for reported_url param

* Add missing files

* Add validations and tests for feedback_messages

* Clean up some html

* Update create spec and add update spec

* Add mail tests and lint

* Add link to user profile
2018-06-19 16:41:31 -04:00

6 lines
181 B
Ruby

class ChangeNotesToPolymorphic < ActiveRecord::Migration[5.1]
def change
rename_column :notes, :user_id, :noteable_id
add_column :notes, :noteable_type, :string
end
end