Skip to content

Instantly share code, notes, and snippets.

@danielres
Created November 29, 2010 22:34
Show Gist options
  • Save danielres/720771 to your computer and use it in GitHub Desktop.
Save danielres/720771 to your computer and use it in GitHub Desktop.
Just a simple DB schema for a rails simple blog
ActiveRecord::Schema.define(:version => 20101119175732) do
create_table "categories", :force => true do |t|
t.string "name"
t.string "shortname"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "categories_posts", :id => false, :force => true do |t|
t.integer "category_id"
t.integer "post_id"
end
create_table "comments", :force => true do |t|
t.text "content"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
end
create_table "posts", :force => true do |t|
t.string "title"
t.text "content"
t.integer "user_id"
t.datetime "created_ad"
t.datetime "updated_at"
t.datetime "created_at"
end
create_table "users", :force => true do |t|
t.string "first_name"
t.string "last_name"
t.string "display_name"
t.string "name"
t.string "email"
t.string "password"
t.datetime "created_at"
t.datetime "updated_at"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment