Sha256: 9fa247c7251e922063c1530b7417226993e1c789ee8a5c447db6d55c70268cd1
Contents?: true
Size: 352 Bytes
Versions: 3
Compression:
Stored size: 352 Bytes
Contents
class CreateRefOne < ActiveRecord::Migration def self.up create_table :users do |t| t.string :name t.integer :role_id # a user can have ONE role t.timestamps end create_table :roles do |t| t.string :name t.timestamps end end def self.down drop_table :users drop_table :roles end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
troles-0.5.2 | spec/active_record/migrations/one/ref_one.rb |
troles-0.5.1 | spec/active_record/migrations/one/ref_one.rb |
troles-0.5.0 | spec/active_record/migrations/one/ref_one.rb |