forked from scaffeinate/socify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.rb
152 lines (134 loc) · 6.4 KB
/
schema.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
# 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 that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20150723052743) do
create_table "activities", force: true do |t|
t.integer "trackable_id"
t.string "trackable_type"
t.integer "owner_id"
t.string "owner_type"
t.string "key"
t.text "parameters"
t.integer "recipient_id"
t.string "recipient_type"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "activities", ["owner_id", "owner_type"], name: "index_activities_on_owner_id_and_owner_type"
add_index "activities", ["recipient_id", "recipient_type"], name: "index_activities_on_recipient_id_and_recipient_type"
add_index "activities", ["trackable_id", "trackable_type"], name: "index_activities_on_trackable_id_and_trackable_type"
create_table "comments", force: true do |t|
t.string "title", limit: 50, default: ""
t.text "comment"
t.integer "commentable_id"
t.string "commentable_type"
t.integer "user_id"
t.string "role", default: "comments"
t.datetime "created_at"
t.datetime "updated_at"
t.text "comment_html"
end
add_index "comments", ["commentable_id"], name: "index_comments_on_commentable_id"
add_index "comments", ["commentable_type"], name: "index_comments_on_commentable_type"
add_index "comments", ["user_id"], name: "index_comments_on_user_id"
create_table "events", force: true do |t|
t.string "name"
t.datetime "when"
t.integer "user_id"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "cached_votes_up", default: 0
t.integer "comments_count", default: 0
end
add_index "events", ["cached_votes_up"], name: "index_events_on_cached_votes_up"
add_index "events", ["comments_count"], name: "index_events_on_comments_count"
add_index "events", ["user_id"], name: "index_events_on_user_id"
create_table "follows", force: true do |t|
t.integer "followable_id", null: false
t.string "followable_type", null: false
t.integer "follower_id", null: false
t.string "follower_type", null: false
t.boolean "blocked", default: false, null: false
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "follows", ["followable_id", "followable_type"], name: "fk_followables"
add_index "follows", ["follower_id", "follower_type"], name: "fk_follows"
create_table "friendly_id_slugs", force: true do |t|
t.string "slug", null: false
t.integer "sluggable_id", null: false
t.string "sluggable_type", limit: 50
t.string "scope"
t.datetime "created_at"
end
add_index "friendly_id_slugs", ["slug", "sluggable_type", "scope"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type_and_scope", unique: true
add_index "friendly_id_slugs", ["slug", "sluggable_type"], name: "index_friendly_id_slugs_on_slug_and_sluggable_type"
add_index "friendly_id_slugs", ["sluggable_id"], name: "index_friendly_id_slugs_on_sluggable_id"
add_index "friendly_id_slugs", ["sluggable_type"], name: "index_friendly_id_slugs_on_sluggable_type"
create_table "posts", force: true do |t|
t.text "content", null: false
t.integer "user_id"
t.string "attachment"
t.datetime "created_at"
t.datetime "updated_at"
t.integer "cached_votes_up", default: 0
t.integer "comments_count", default: 0
t.text "content_html"
end
add_index "posts", ["cached_votes_up"], name: "index_posts_on_cached_votes_up"
add_index "posts", ["comments_count"], name: "index_posts_on_comments_count"
add_index "posts", ["user_id"], name: "index_posts_on_user_id"
create_table "users", force: true do |t|
t.string "name", default: "", null: false
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.string "about"
t.string "avatar"
t.string "cover"
t.string "reset_password_token"
t.datetime "reset_password_sent_at"
t.datetime "remember_created_at"
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.string "confirmation_token"
t.datetime "confirmed_at"
t.datetime "confirmation_sent_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "sex", default: "male", null: false
t.string "location"
t.date "dob"
t.string "phone_number"
t.integer "posts_count", default: 0, null: false
t.string "slug"
end
add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
add_index "users", ["email"], name: "index_users_on_email", unique: true
add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
add_index "users", ["slug"], name: "index_users_on_slug", unique: true
create_table "votes", force: true do |t|
t.integer "votable_id"
t.string "votable_type"
t.integer "voter_id"
t.string "voter_type"
t.boolean "vote_flag"
t.string "vote_scope"
t.integer "vote_weight"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "votes", ["votable_id", "votable_type", "vote_scope"], name: "index_votes_on_votable_id_and_votable_type_and_vote_scope"
add_index "votes", ["voter_id", "voter_type", "vote_scope"], name: "index_votes_on_voter_id_and_voter_type_and_vote_scope"
end