Files
grecia/db/migrate/20201117200945_create_sdg_relations.rb
Javi Martín a1439d0790 Apply Layout/LineLength rubocop rule
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
2023-08-30 14:46:35 +02:00

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