Skip to content

Instantly share code, notes, and snippets.

@e1senh0rn
Forked from anonymous/snippet.rb
Created June 25, 2011 20:11
Show Gist options
  • Save e1senh0rn/1046851 to your computer and use it in GitHub Desktop.
Save e1senh0rn/1046851 to your computer and use it in GitHub Desktop.
class CreateBundles < ActiveRecord::Migration
def self.up
create_table :bundles do |t|
t.string :bundle_id, :null => false
t.string :title, :null => false
t.timestamps
end
add_index :bundles, :bundle_id, :unique => true
end
def self.down
drop_table :bundles
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment