Skip to content

Instantly share code, notes, and snippets.

@briancicutti
Created July 3, 2012 21:42
Show Gist options
  • Save briancicutti/3043510 to your computer and use it in GitHub Desktop.
Save briancicutti/3043510 to your computer and use it in GitHub Desktop.
example migration
class CreateUsers < ActiveRecord::Migration
def self.up
create_table "users" do |t|
t.column :login, :string, :limit => 40
t.column :name, :string, :limit => 100, :default => '', :null => true
t.column :email, :string, :limit => 100
end
def self.down
drop_table "users"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment