Files
nairobi/db/migrate/20201112155047_create_sdg_targets.rb
Senén Rodero Rodríguez c39c7213c7 Add SDG target model
and its relation with the SDG goal model.

Add comparable module be able to sort collections of targets
by code attribute.

Co-Authored-By: Javi Martín <35156+javierm@users.noreply.github.com>
2020-12-04 15:15:32 +01:00

12 lines
235 B
Ruby

class CreateSDGTargets < ActiveRecord::Migration[5.2]
def change
create_table :sdg_targets do |t|
t.references :goal
t.string :code, null: false
t.timestamps
t.index :code, unique: true
end
end
end