Note we're excluding a few files: * Configuration files that weren't generated by us * Migration files that weren't generated by us * The Gemfile, since it includes an important comment that must be on the same line as the gem declaration * The Budget::Stats class, since the heading statistics are a mess and having shorter lines would require a lot of refactoring
15 lines
402 B
Ruby
15 lines
402 B
Ruby
class CreateSDGRelations < ActiveRecord::Migration[5.2]
|
|
def change
|
|
create_table :sdg_relations do |t|
|
|
t.references :related_sdg, polymorphic: true
|
|
t.references :relatable, polymorphic: true
|
|
|
|
t.index [:related_sdg_id, :related_sdg_type, :relatable_id, :relatable_type],
|
|
name: "sdg_relations_unique",
|
|
unique: true
|
|
|
|
t.timestamps
|
|
end
|
|
end
|
|
end
|