Created
April 10, 2016 05:34
-
-
Save blimey85/669d6fc6f2ec1e0bd7be257e2c617681 to your computer and use it in GitHub Desktop.
Beers sample app db schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveRecord::Schema.define(version: 20160331201031) do | |
create_table "beers", force: :cascade do |t| | |
t.string "name", limit: 255 | |
t.text "description", limit: 65535 | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
t.integer "comments_count", limit: 4, default: 0, null: false | |
end | |
create_table "comment_hierarchies", id: false, force: :cascade do |t| | |
t.integer "ancestor_id", limit: 4, null: false | |
t.integer "descendant_id", limit: 4, null: false | |
t.integer "generations", limit: 4, null: false | |
end | |
add_index "comment_hierarchies", ["ancestor_id", "descendant_id", "generations"], name: "comment_anc_desc_udx", unique: true, using: :btree | |
add_index "comment_hierarchies", ["descendant_id"], name: "comment_desc_idx", using: :btree | |
create_table "comments", force: :cascade do |t| | |
t.integer "commentable_id", limit: 4 | |
t.string "commentable_type", limit: 255 | |
t.string "title", limit: 255 | |
t.text "body", limit: 65535 | |
t.string "subject", limit: 255 | |
t.integer "user_id", limit: 4, null: false | |
t.integer "parent_id", limit: 4 | |
t.integer "lft", limit: 4 | |
t.integer "rgt", limit: 4 | |
t.datetime "created_at" | |
t.datetime "updated_at" | |
end | |
add_index "comments", ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type", using: :btree | |
add_index "comments", ["user_id"], name: "index_comments_on_user_id", using: :btree | |
create_table "users", force: :cascade do |t| | |
t.string "email", limit: 255, default: "", null: false | |
t.string "encrypted_password", limit: 255, default: "", null: false | |
t.string "reset_password_token", limit: 255 | |
t.datetime "reset_password_sent_at" | |
t.datetime "remember_created_at" | |
t.integer "sign_in_count", limit: 4, default: 0, null: false | |
t.datetime "current_sign_in_at" | |
t.datetime "last_sign_in_at" | |
t.string "current_sign_in_ip", limit: 255 | |
t.string "last_sign_in_ip", limit: 255 | |
t.datetime "created_at", null: false | |
t.datetime "updated_at", null: false | |
end | |
add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree | |
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment