This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2023-03-27 07:09:10 -07:00
|
|
|
class CreateReportNotes < ActiveRecord::Migration[5.2]
|
2018-04-02 13:04:14 -07:00
|
|
|
def change
|
|
|
|
create_table :report_notes do |t|
|
|
|
|
t.text :content, null: false
|
|
|
|
t.references :report, null: false
|
|
|
|
t.references :account, null: false
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
2019-06-09 13:55:28 -07:00
|
|
|
safety_assured { add_foreign_key :report_notes, :reports, column: :report_id, on_delete: :cascade }
|
|
|
|
safety_assured { add_foreign_key :report_notes, :accounts, column: :account_id, on_delete: :cascade }
|
2018-04-02 13:04:14 -07:00
|
|
|
end
|
|
|
|
end
|