Skip to content

Instantly share code, notes, and snippets.

@pcmantz
Created March 4, 2013 21:53
Show Gist options
  • Save pcmantz/5086018 to your computer and use it in GitHub Desktop.
Save pcmantz/5086018 to your computer and use it in GitHub Desktop.
create_table(:bundles, :ignore_index_errors=>true) do
primary_key :id
String :name, :size=>255, :null=>false
String :version, :size=>255, :null=>false
Integer :revision, :null=>false
Integer :user_id, :null=>false
DateTime :created_at, :null=>false
DateTime :updated_at, :null=>false
DateTime :public_at
foreign_key [:user_id, :user_id], :users, :name=>:bundles_user_id_fk, :key=>[:id, :id]
index [:user_id], :name=>:bundles_user_id_fk
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment