Skip to content

Instantly share code, notes, and snippets.

@aesmail
Created August 16, 2012 10:17
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 aesmail/3369071 to your computer and use it in GitHub Desktop.
Save aesmail/3369071 to your computer and use it in GitHub Desktop.
class CreatePosts < ActiveRecord::Migration
def change
create_table :posts do |t|
t.references :blog, :null => false
t.datetime :post_date, :null => false
t.string :url, :null => false
t.string :author
t.string :title, :null => false
t.attachment :image, :null => false
t.text :body
t.timestamps
end
add_index :posts, :blog_id
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment