and its relation with relatables Note about sdg_review factory: Cannot use the constantize method on the relatable_type as long as the relatable classes will be loaded and this will throw an exception because the database is not available at factiry definition time.
9 lines
215 B
Ruby
9 lines
215 B
Ruby
class CreateSDGReviews < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :sdg_reviews do |t|
|
|
t.references :relatable, polymorphic: true, index: { unique: true }
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|