Files: 3dedf91059efa9734964b7928b3fc7ed78522894 / db / schema.rb
3181 bytesRaw
1 | # encoding: UTF-8 |
2 | # This file is auto-generated from the current state of the database. Instead |
3 | # of editing this file, please use the migrations feature of Active Record to |
4 | # incrementally modify your database, and then regenerate this schema definition. |
5 | # |
6 | # Note that this schema.rb definition is the authoritative source for your |
7 | # database schema. If you need to create the application database on another |
8 | # system, you should be using db:schema:load, not running all the migrations |
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations |
10 | # you'll amass, the slower it'll run and the greater likelihood for issues). |
11 | # |
12 | # It's strongly recommended that you check this file into your version control system. |
13 | |
14 | ActiveRecord::Schema.define(version: 20170404090156) do |
15 | |
16 | # These are extensions that must be enabled in order to support this database |
17 | enable_extension "plpgsql" |
18 | |
19 | create_table "monologue_posts", force: :cascade do |t| |
20 | t.boolean "published" |
21 | t.datetime "created_at" |
22 | t.datetime "updated_at" |
23 | t.integer "user_id" |
24 | t.string "title" |
25 | t.text "content" |
26 | t.string "url" |
27 | t.datetime "published_at" |
28 | end |
29 | |
30 | add_index "monologue_posts", ["url"], name: "index_monologue_posts_on_url", unique: true, using: :btree |
31 | |
32 | create_table "monologue_taggings", force: :cascade do |t| |
33 | t.integer "post_id" |
34 | t.integer "tag_id" |
35 | end |
36 | |
37 | add_index "monologue_taggings", ["post_id"], name: "index_monologue_taggings_on_post_id", using: :btree |
38 | add_index "monologue_taggings", ["tag_id"], name: "index_monologue_taggings_on_tag_id", using: :btree |
39 | |
40 | create_table "monologue_tags", force: :cascade do |t| |
41 | t.string "name" |
42 | end |
43 | |
44 | add_index "monologue_tags", ["name"], name: "index_monologue_tags_on_name", using: :btree |
45 | |
46 | create_table "monologue_users", force: :cascade do |t| |
47 | t.string "name" |
48 | t.string "email" |
49 | t.string "password_digest" |
50 | t.datetime "created_at" |
51 | t.datetime "updated_at" |
52 | end |
53 | |
54 | create_table "posts", force: :cascade do |t| |
55 | t.string "title" |
56 | t.text "body" |
57 | t.integer "user_id" |
58 | t.text "tags" |
59 | t.datetime "created_at", null: false |
60 | t.datetime "updated_at", null: false |
61 | end |
62 | |
63 | add_index "posts", ["user_id"], name: "index_posts_on_user_id", using: :btree |
64 | |
65 | create_table "users", force: :cascade do |t| |
66 | t.string "email", default: "", null: false |
67 | t.string "encrypted_password", default: "", null: false |
68 | t.string "reset_password_token" |
69 | t.datetime "reset_password_sent_at" |
70 | t.datetime "remember_created_at" |
71 | t.integer "sign_in_count", default: 0, null: false |
72 | t.datetime "current_sign_in_at" |
73 | t.datetime "last_sign_in_at" |
74 | t.inet "current_sign_in_ip" |
75 | t.inet "last_sign_in_ip" |
76 | t.datetime "created_at", null: false |
77 | t.datetime "updated_at", null: false |
78 | end |
79 | |
80 | add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree |
81 | add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree |
82 | |
83 | add_foreign_key "posts", "users" |
84 | end |
85 |
Built with git-ssb-web