Skip to content

Instantly share code, notes, and snippets.

@loss-zz
Created September 8, 2011 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save loss-zz/1202696 to your computer and use it in GitHub Desktop.
Save loss-zz/1202696 to your computer and use it in GitHub Desktop.
schema.rb
# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20110907123846) do
create_table "users", :force => true do |t|
t.string "name"
t.string "email"
t.string "password_digest"
t.string "confirmation_token"
t.string "remember_token"
t.datetime "created_at"
t.datetime "updated_at"
t.string "role"
end
create_table "sections", :force => true do |t|
t.string "name"
t.string "title"
t.datetime "created_at"
t.datetime "updated_at"
t.string "title_alternative"
t.integer "nodes_count", :default => 0
end
add_index "sections", ["name"], :name => "index_sections_on_name"
create_table "nodes", :force => true do |t|
t.string "slug"
t.string "name"
t.integer "postion_at", :default => 0
t.string "status", :default => "active"
t.text "description"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "section_id"
end
add_index "nodes", ["slug"], :name => "index_nodes_on_slug"
create_table "topics", :force => true do |t|
t.integer "user_id"
t.integer "node_id"
t.string "title"
t.integer "posts_count"
t.integer "last_post_id"
t.datetime "last_updated_at"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "topics", ["node_id"], :name => "index_topics_on_node_id"
add_index "topics", ["user_id"], :name => "index_topics_on_user_id"
create_table "posts", :force => true do |t|
t.integer "user_id"
t.integer "topic_id"
t.boolean "major", :default => false
t.text "body"
t.text "html_body"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "posts", ["topic_id"], :name => "index_posts_on_topic_id"
add_index "posts", ["user_id"], :name => "index_posts_on_user_id"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment