Skip to content

Instantly share code, notes, and snippets.

@zxcvbnm4709
Created July 26, 2011 09:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zxcvbnm4709/1106356 to your computer and use it in GitHub Desktop.
Save zxcvbnm4709/1106356 to your computer and use it in GitHub Desktop.
Famisick member migration
class CreateMembers < ActiveRecord::Migration
def self.up
create_table :members do |t|
t.integer :family_id
t.string :name
t.integer :tree_position_id
t.string :gender
t.datetime :birthday
t.string :bloodtype
t.timestamps
end
add_index :members, :family_id
add_index :members, :birthday
end
def self.down
drop_table :members
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment