source: RedSur/db/schema.rb @ ad6b806

modelo_minuta
Last change on this file since ad6b806 was ad6b806, checked in by aosorio <aosorio@…>, 8 years ago

Reiniciado el esquema de la DB y arreglados varios detalles pendientes

  • Property mode set to 100755
File size: 31.0 KB
Line 
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
14ActiveRecord::Schema.define(version: 20160519180240) do
15
16  # These are extensions that must be enabled in order to support this database
17  enable_extension "plpgsql"
18
19  create_table "account_deletions", force: :cascade do |t|
20    t.string   "diaspora_handle"
21    t.integer  "person_id"
22    t.datetime "completed_at"
23  end
24
25  create_table "area_memberships", force: :cascade do |t|
26    t.integer  "area_id"
27    t.integer  "user_id"
28    t.datetime "created_at", null: false
29    t.datetime "updated_at", null: false
30  end
31
32  add_index "area_memberships", ["area_id"], name: "index_area_memberships_on_area_id", using: :btree
33  add_index "area_memberships", ["user_id"], name: "index_area_memberships_on_user_id", using: :btree
34
35  create_table "areas", force: :cascade do |t|
36    t.string   "name",       limit: 30
37    t.datetime "created_at",            null: false
38    t.datetime "updated_at",            null: false
39  end
40
41  add_index "areas", ["name"], name: "index_areas_on_name", unique: true, using: :btree
42
43  create_table "aspect_memberships", force: :cascade do |t|
44    t.integer  "aspect_id",  null: false
45    t.integer  "contact_id", null: false
46    t.datetime "created_at", null: false
47    t.datetime "updated_at", null: false
48  end
49
50  add_index "aspect_memberships", ["aspect_id", "contact_id"], name: "index_aspect_memberships_on_aspect_id_and_contact_id", unique: true, using: :btree
51  add_index "aspect_memberships", ["aspect_id"], name: "index_aspect_memberships_on_aspect_id", using: :btree
52  add_index "aspect_memberships", ["contact_id"], name: "index_aspect_memberships_on_contact_id", using: :btree
53
54  create_table "aspect_visibilities", force: :cascade do |t|
55    t.integer  "shareable_id",                    null: false
56    t.integer  "aspect_id",                       null: false
57    t.datetime "created_at",                      null: false
58    t.datetime "updated_at",                      null: false
59    t.string   "shareable_type", default: "Post", null: false
60  end
61
62  add_index "aspect_visibilities", ["aspect_id"], name: "index_aspect_visibilities_on_aspect_id", using: :btree
63  add_index "aspect_visibilities", ["shareable_id", "shareable_type", "aspect_id"], name: "shareable_and_aspect_id", using: :btree
64  add_index "aspect_visibilities", ["shareable_id", "shareable_type"], name: "index_aspect_visibilities_on_shareable_id_and_shareable_type", using: :btree
65
66  create_table "aspects", force: :cascade do |t|
67    t.string   "name",                             null: false
68    t.integer  "user_id",                          null: false
69    t.datetime "created_at",                       null: false
70    t.datetime "updated_at",                       null: false
71    t.boolean  "contacts_visible", default: true,  null: false
72    t.integer  "order_id"
73    t.boolean  "chat_enabled",     default: false
74    t.integer  "area_id"
75  end
76
77  add_index "aspects", ["area_id"], name: "index_aspects_on_area_id", using: :btree
78  add_index "aspects", ["user_id", "contacts_visible"], name: "index_aspects_on_user_id_and_contacts_visible", using: :btree
79  add_index "aspects", ["user_id"], name: "index_aspects_on_user_id", using: :btree
80
81  create_table "blocks", force: :cascade do |t|
82    t.integer "user_id"
83    t.integer "person_id"
84  end
85
86  create_table "chat_contacts", force: :cascade do |t|
87    t.integer "user_id",                  null: false
88    t.string  "jid",                      null: false
89    t.string  "name",         limit: 255
90    t.string  "ask",          limit: 128
91    t.string  "subscription", limit: 128, null: false
92  end
93
94  add_index "chat_contacts", ["user_id", "jid"], name: "index_chat_contacts_on_user_id_and_jid", unique: true, using: :btree
95
96  create_table "chat_fragments", force: :cascade do |t|
97    t.integer "user_id",               null: false
98    t.string  "root",      limit: 256, null: false
99    t.string  "namespace", limit: 256, null: false
100    t.text    "xml",                   null: false
101  end
102
103  add_index "chat_fragments", ["user_id"], name: "index_chat_fragments_on_user_id", unique: true, using: :btree
104
105  create_table "chat_offline_messages", force: :cascade do |t|
106    t.string   "from",       null: false
107    t.string   "to",         null: false
108    t.text     "message",    null: false
109    t.datetime "created_at", null: false
110  end
111
112  create_table "comments", force: :cascade do |t|
113    t.text     "text",                                                null: false
114    t.integer  "commentable_id",                                      null: false
115    t.integer  "author_id",                                           null: false
116    t.string   "guid",                                                null: false
117    t.text     "author_signature"
118    t.text     "parent_author_signature"
119    t.datetime "created_at",                                          null: false
120    t.datetime "updated_at",                                          null: false
121    t.integer  "likes_count",                        default: 0,      null: false
122    t.string   "commentable_type",        limit: 60, default: "Post", null: false
123  end
124
125  add_index "comments", ["author_id"], name: "index_comments_on_person_id", using: :btree
126  add_index "comments", ["commentable_id", "commentable_type"], name: "index_comments_on_commentable_id_and_commentable_type", using: :btree
127  add_index "comments", ["guid"], name: "index_comments_on_guid", unique: true, using: :btree
128
129  create_table "contacts", force: :cascade do |t|
130    t.integer  "user_id",                    null: false
131    t.integer  "person_id",                  null: false
132    t.datetime "created_at",                 null: false
133    t.datetime "updated_at",                 null: false
134    t.boolean  "sharing",    default: false, null: false
135    t.boolean  "receiving",  default: false, null: false
136  end
137
138  add_index "contacts", ["person_id"], name: "index_contacts_on_person_id", using: :btree
139  add_index "contacts", ["user_id", "person_id"], name: "index_contacts_on_user_id_and_person_id", unique: true, using: :btree
140
141  create_table "conversation_visibilities", force: :cascade do |t|
142    t.integer  "conversation_id",             null: false
143    t.integer  "person_id",                   null: false
144    t.integer  "unread",          default: 0, null: false
145    t.datetime "created_at",                  null: false
146    t.datetime "updated_at",                  null: false
147  end
148
149  add_index "conversation_visibilities", ["conversation_id", "person_id"], name: "index_conversation_visibilities_usefully", unique: true, using: :btree
150  add_index "conversation_visibilities", ["conversation_id"], name: "index_conversation_visibilities_on_conversation_id", using: :btree
151  add_index "conversation_visibilities", ["person_id"], name: "index_conversation_visibilities_on_person_id", using: :btree
152
153  create_table "conversations", force: :cascade do |t|
154    t.string   "subject"
155    t.string   "guid",       null: false
156    t.integer  "author_id",  null: false
157    t.datetime "created_at", null: false
158    t.datetime "updated_at", null: false
159  end
160
161  add_index "conversations", ["author_id"], name: "conversations_author_id_fk", using: :btree
162
163  create_table "invitation_codes", force: :cascade do |t|
164    t.string   "token"
165    t.integer  "user_id"
166    t.integer  "count"
167    t.datetime "created_at", null: false
168    t.datetime "updated_at", null: false
169  end
170
171  create_table "invitations", force: :cascade do |t|
172    t.text     "message"
173    t.integer  "sender_id"
174    t.integer  "recipient_id"
175    t.integer  "aspect_id"
176    t.datetime "created_at",                   null: false
177    t.datetime "updated_at",                   null: false
178    t.string   "service"
179    t.string   "identifier"
180    t.boolean  "admin",        default: false
181    t.string   "language",     default: "en"
182  end
183
184  add_index "invitations", ["aspect_id"], name: "index_invitations_on_aspect_id", using: :btree
185  add_index "invitations", ["recipient_id"], name: "index_invitations_on_recipient_id", using: :btree
186  add_index "invitations", ["sender_id"], name: "index_invitations_on_sender_id", using: :btree
187
188  create_table "likes", force: :cascade do |t|
189    t.boolean  "positive",                           default: true
190    t.integer  "target_id"
191    t.integer  "author_id"
192    t.string   "guid"
193    t.text     "author_signature"
194    t.text     "parent_author_signature"
195    t.datetime "created_at",                                        null: false
196    t.datetime "updated_at",                                        null: false
197    t.string   "target_type",             limit: 60,                null: false
198  end
199
200  add_index "likes", ["author_id"], name: "likes_author_id_fk", using: :btree
201  add_index "likes", ["guid"], name: "index_likes_on_guid", unique: true, using: :btree
202  add_index "likes", ["target_id", "author_id", "target_type"], name: "index_likes_on_target_id_and_author_id_and_target_type", unique: true, using: :btree
203  add_index "likes", ["target_id"], name: "index_likes_on_post_id", using: :btree
204
205  create_table "locations", force: :cascade do |t|
206    t.string   "address"
207    t.string   "lat"
208    t.string   "lng"
209    t.integer  "status_message_id"
210    t.datetime "created_at",        null: false
211    t.datetime "updated_at",        null: false
212  end
213
214  create_table "mentions", force: :cascade do |t|
215    t.integer "post_id",   null: false
216    t.integer "person_id", null: false
217  end
218
219  add_index "mentions", ["person_id", "post_id"], name: "index_mentions_on_person_id_and_post_id", unique: true, using: :btree
220  add_index "mentions", ["person_id"], name: "index_mentions_on_person_id", using: :btree
221  add_index "mentions", ["post_id"], name: "index_mentions_on_post_id", using: :btree
222
223  create_table "messages", force: :cascade do |t|
224    t.integer  "conversation_id",         null: false
225    t.integer  "author_id",               null: false
226    t.string   "guid",                    null: false
227    t.text     "text",                    null: false
228    t.datetime "created_at",              null: false
229    t.datetime "updated_at",              null: false
230    t.text     "author_signature"
231    t.text     "parent_author_signature"
232  end
233
234  add_index "messages", ["author_id"], name: "index_messages_on_author_id", using: :btree
235  add_index "messages", ["conversation_id"], name: "messages_conversation_id_fk", using: :btree
236
237  create_table "notification_actors", force: :cascade do |t|
238    t.integer  "notification_id"
239    t.integer  "person_id"
240    t.datetime "created_at",      null: false
241    t.datetime "updated_at",      null: false
242  end
243
244  add_index "notification_actors", ["notification_id", "person_id"], name: "index_notification_actors_on_notification_id_and_person_id", unique: true, using: :btree
245  add_index "notification_actors", ["notification_id"], name: "index_notification_actors_on_notification_id", using: :btree
246  add_index "notification_actors", ["person_id"], name: "index_notification_actors_on_person_id", using: :btree
247
248  create_table "notifications", force: :cascade do |t|
249    t.string   "target_type"
250    t.integer  "target_id"
251    t.integer  "recipient_id",                null: false
252    t.boolean  "unread",       default: true, null: false
253    t.datetime "created_at",                  null: false
254    t.datetime "updated_at",                  null: false
255    t.string   "type"
256  end
257
258  add_index "notifications", ["recipient_id"], name: "index_notifications_on_recipient_id", using: :btree
259  add_index "notifications", ["target_id"], name: "index_notifications_on_target_id", using: :btree
260  add_index "notifications", ["target_type", "target_id"], name: "index_notifications_on_target_type_and_target_id", using: :btree
261
262  create_table "o_embed_caches", force: :cascade do |t|
263    t.string "url",  limit: 1024, null: false
264    t.text   "data",              null: false
265  end
266
267  add_index "o_embed_caches", ["url"], name: "index_o_embed_caches_on_url", using: :btree
268
269  create_table "open_graph_caches", force: :cascade do |t|
270    t.string "title"
271    t.string "ob_type"
272    t.text   "image"
273    t.text   "url"
274    t.text   "description"
275  end
276
277  create_table "participations", force: :cascade do |t|
278    t.string   "guid"
279    t.integer  "target_id"
280    t.string   "target_type",             limit: 60, null: false
281    t.integer  "author_id"
282    t.text     "author_signature"
283    t.text     "parent_author_signature"
284    t.datetime "created_at",                         null: false
285    t.datetime "updated_at",                         null: false
286  end
287
288  add_index "participations", ["guid"], name: "index_participations_on_guid", using: :btree
289  add_index "participations", ["target_id", "target_type", "author_id"], name: "index_participations_on_target_id_and_target_type_and_author_id", using: :btree
290
291  create_table "people", force: :cascade do |t|
292    t.string   "guid",                                  null: false
293    t.text     "url",                                   null: false
294    t.string   "diaspora_handle",                       null: false
295    t.text     "serialized_public_key",                 null: false
296    t.integer  "owner_id"
297    t.datetime "created_at",                            null: false
298    t.datetime "updated_at",                            null: false
299    t.boolean  "closed_account",        default: false
300    t.integer  "fetch_status",          default: 0
301  end
302
303  add_index "people", ["diaspora_handle"], name: "index_people_on_diaspora_handle", unique: true, using: :btree
304  add_index "people", ["guid"], name: "index_people_on_guid", unique: true, using: :btree
305  add_index "people", ["owner_id"], name: "index_people_on_owner_id", unique: true, using: :btree
306
307  create_table "photos", force: :cascade do |t|
308    t.integer  "tmp_old_id"
309    t.integer  "author_id",                           null: false
310    t.boolean  "public",              default: false, null: false
311    t.string   "diaspora_handle"
312    t.string   "guid",                                null: false
313    t.boolean  "pending",             default: false, null: false
314    t.text     "text"
315    t.text     "remote_photo_path"
316    t.string   "remote_photo_name"
317    t.string   "random_string"
318    t.string   "processed_image"
319    t.datetime "created_at"
320    t.datetime "updated_at"
321    t.string   "unprocessed_image"
322    t.string   "status_message_guid"
323    t.integer  "comments_count"
324    t.integer  "height"
325    t.integer  "width"
326  end
327
328  add_index "photos", ["status_message_guid"], name: "index_photos_on_status_message_guid", using: :btree
329
330  create_table "pods", force: :cascade do |t|
331    t.string   "host"
332    t.boolean  "ssl"
333    t.datetime "created_at", null: false
334    t.datetime "updated_at", null: false
335  end
336
337  create_table "poll_acuerdos", force: :cascade do |t|
338    t.text     "text"
339    t.datetime "created_at", null: false
340    t.datetime "updated_at", null: false
341    t.integer  "poll_id"
342  end
343
344  add_index "poll_acuerdos", ["poll_id"], name: "index_poll_acuerdos_on_poll_id", using: :btree
345
346  create_table "poll_answers", force: :cascade do |t|
347    t.string  "answer",                 null: false
348    t.integer "poll_id",                null: false
349    t.string  "guid"
350    t.integer "vote_count", default: 0
351  end
352
353  add_index "poll_answers", ["poll_id"], name: "index_poll_answers_on_poll_id", using: :btree
354
355  create_table "poll_asistentes", force: :cascade do |t|
356    t.text     "text"
357    t.datetime "created_at", null: false
358    t.datetime "updated_at", null: false
359    t.integer  "poll_id"
360  end
361
362  add_index "poll_asistentes", ["poll_id"], name: "index_poll_asistentes_on_poll_id", using: :btree
363
364  create_table "poll_asuntos", force: :cascade do |t|
365    t.text     "text"
366    t.datetime "created_at", null: false
367    t.datetime "updated_at", null: false
368    t.integer  "poll_id"
369  end
370
371  add_index "poll_asuntos", ["poll_id"], name: "index_poll_asuntos_on_poll_id", using: :btree
372
373  create_table "poll_participations", force: :cascade do |t|
374    t.integer  "poll_answer_id",          null: false
375    t.integer  "author_id",               null: false
376    t.integer  "poll_id",                 null: false
377    t.string   "guid"
378    t.text     "author_signature"
379    t.text     "parent_author_signature"
380    t.datetime "created_at"
381    t.datetime "updated_at"
382  end
383
384  add_index "poll_participations", ["poll_id"], name: "index_poll_participations_on_poll_id", using: :btree
385
386  create_table "poll_puntos", force: :cascade do |t|
387    t.text     "text"
388    t.datetime "created_at", null: false
389    t.datetime "updated_at", null: false
390    t.integer  "poll_id"
391  end
392
393  add_index "poll_puntos", ["poll_id"], name: "index_poll_puntos_on_poll_id", using: :btree
394
395  create_table "poll_responsables", force: :cascade do |t|
396    t.text     "text"
397    t.datetime "created_at", null: false
398    t.datetime "updated_at", null: false
399    t.integer  "poll_id"
400  end
401
402  add_index "poll_responsables", ["poll_id"], name: "index_poll_responsables_on_poll_id", using: :btree
403
404  create_table "polls", force: :cascade do |t|
405    t.string   "question",          null: false
406    t.integer  "status_message_id", null: false
407    t.boolean  "status"
408    t.string   "guid"
409    t.datetime "created_at"
410    t.datetime "updated_at"
411    t.integer  "poll_id"
412  end
413
414  add_index "polls", ["poll_id"], name: "index_polls_on_poll_id", using: :btree
415  add_index "polls", ["status_message_id"], name: "index_polls_on_status_message_id", using: :btree
416
417  create_table "posts", force: :cascade do |t|
418    t.integer  "author_id",                                        null: false
419    t.boolean  "public",                           default: false, null: false
420    t.string   "diaspora_handle"
421    t.string   "guid",                                             null: false
422    t.boolean  "pending",                          default: false, null: false
423    t.string   "type",                  limit: 40,                 null: false
424    t.text     "text"
425    t.text     "remote_photo_path"
426    t.string   "remote_photo_name"
427    t.string   "random_string"
428    t.string   "processed_image"
429    t.datetime "created_at",                                       null: false
430    t.datetime "updated_at",                                       null: false
431    t.string   "unprocessed_image"
432    t.string   "object_url"
433    t.string   "image_url"
434    t.integer  "image_height"
435    t.integer  "image_width"
436    t.string   "provider_display_name"
437    t.string   "actor_url"
438    t.string   "objectId"
439    t.string   "root_guid"
440    t.string   "status_message_guid"
441    t.integer  "likes_count",                      default: 0
442    t.integer  "comments_count",                   default: 0
443    t.integer  "o_embed_cache_id"
444    t.integer  "reshares_count",                   default: 0
445    t.datetime "interacted_at"
446    t.string   "frame_name"
447    t.boolean  "favorite",                         default: false
448    t.string   "facebook_id"
449    t.string   "tweet_id"
450    t.integer  "open_graph_cache_id"
451    t.text     "tumblr_ids"
452  end
453
454  add_index "posts", ["author_id", "root_guid"], name: "index_posts_on_author_id_and_root_guid", unique: true, using: :btree
455  add_index "posts", ["author_id"], name: "index_posts_on_person_id", using: :btree
456  add_index "posts", ["guid"], name: "index_posts_on_guid", unique: true, using: :btree
457  add_index "posts", ["id", "type", "created_at"], name: "index_posts_on_id_and_type_and_created_at", using: :btree
458  add_index "posts", ["root_guid"], name: "index_posts_on_root_guid", using: :btree
459  add_index "posts", ["status_message_guid", "pending"], name: "index_posts_on_status_message_guid_and_pending", using: :btree
460  add_index "posts", ["status_message_guid"], name: "index_posts_on_status_message_guid", using: :btree
461  add_index "posts", ["tweet_id"], name: "index_posts_on_tweet_id", using: :btree
462  add_index "posts", ["type", "pending", "id"], name: "index_posts_on_type_and_pending_and_id", using: :btree
463
464  create_table "profiles", force: :cascade do |t|
465    t.string   "diaspora_handle"
466    t.string   "first_name",       limit: 127
467    t.string   "last_name",        limit: 127
468    t.string   "image_url"
469    t.string   "image_url_small"
470    t.string   "image_url_medium"
471    t.date     "birthday"
472    t.string   "gender"
473    t.text     "bio"
474    t.boolean  "searchable",                   default: true,  null: false
475    t.integer  "person_id",                                    null: false
476    t.datetime "created_at",                                   null: false
477    t.datetime "updated_at",                                   null: false
478    t.string   "location"
479    t.string   "full_name",        limit: 70
480    t.boolean  "nsfw",                         default: false
481    t.boolean  "is_group"
482    t.string   "front_image"
483  end
484
485  add_index "profiles", ["full_name", "searchable"], name: "index_profiles_on_full_name_and_searchable", using: :btree
486  add_index "profiles", ["full_name"], name: "index_profiles_on_full_name", using: :btree
487  add_index "profiles", ["person_id"], name: "index_profiles_on_person_id", using: :btree
488
489  create_table "rails_admin_histories", force: :cascade do |t|
490    t.text     "message"
491    t.string   "username"
492    t.integer  "item"
493    t.string   "table"
494    t.integer  "month",      limit: 2
495    t.integer  "year",       limit: 8
496    t.datetime "created_at",           null: false
497    t.datetime "updated_at",           null: false
498  end
499
500  add_index "rails_admin_histories", ["item", "table", "month", "year"], name: "index_rails_admin_histories", using: :btree
501
502  create_table "reports", force: :cascade do |t|
503    t.integer  "item_id",                    null: false
504    t.boolean  "reviewed",   default: false
505    t.text     "text"
506    t.datetime "created_at"
507    t.datetime "updated_at"
508    t.string   "item_type",                  null: false
509    t.integer  "user_id",                    null: false
510  end
511
512  add_index "reports", ["item_id"], name: "index_reports_on_item_id", using: :btree
513
514  create_table "roles", force: :cascade do |t|
515    t.integer  "person_id"
516    t.string   "name"
517    t.datetime "created_at", null: false
518    t.datetime "updated_at", null: false
519  end
520
521  create_table "services", force: :cascade do |t|
522    t.string   "type",          limit: 127, null: false
523    t.integer  "user_id",                   null: false
524    t.string   "uid",           limit: 127
525    t.string   "access_token"
526    t.string   "access_secret"
527    t.string   "nickname"
528    t.datetime "created_at",                null: false
529    t.datetime "updated_at",                null: false
530  end
531
532  add_index "services", ["type", "uid"], name: "index_services_on_type_and_uid", using: :btree
533  add_index "services", ["user_id"], name: "index_services_on_user_id", using: :btree
534
535  create_table "share_visibilities", force: :cascade do |t|
536    t.integer  "shareable_id",                               null: false
537    t.datetime "created_at",                                 null: false
538    t.datetime "updated_at",                                 null: false
539    t.boolean  "hidden",                    default: false,  null: false
540    t.integer  "contact_id",                                 null: false
541    t.string   "shareable_type", limit: 60, default: "Post", null: false
542  end
543
544  add_index "share_visibilities", ["contact_id"], name: "index_post_visibilities_on_contact_id", using: :btree
545  add_index "share_visibilities", ["shareable_id", "shareable_type", "contact_id"], name: "shareable_and_contact_id", using: :btree
546  add_index "share_visibilities", ["shareable_id", "shareable_type", "hidden", "contact_id"], name: "shareable_and_hidden_and_contact_id", using: :btree
547  add_index "share_visibilities", ["shareable_id"], name: "index_post_visibilities_on_post_id", using: :btree
548
549  create_table "simple_captcha_data", force: :cascade do |t|
550    t.string   "key",        limit: 40
551    t.string   "value",      limit: 12
552    t.datetime "created_at"
553    t.datetime "updated_at"
554  end
555
556  add_index "simple_captcha_data", ["key"], name: "idx_key", using: :btree
557
558  create_table "tag_followings", force: :cascade do |t|
559    t.integer  "tag_id",     null: false
560    t.integer  "user_id",    null: false
561    t.datetime "created_at", null: false
562    t.datetime "updated_at", null: false
563  end
564
565  add_index "tag_followings", ["tag_id", "user_id"], name: "index_tag_followings_on_tag_id_and_user_id", unique: true, using: :btree
566  add_index "tag_followings", ["tag_id"], name: "index_tag_followings_on_tag_id", using: :btree
567  add_index "tag_followings", ["user_id"], name: "index_tag_followings_on_user_id", using: :btree
568
569  create_table "taggings", force: :cascade do |t|
570    t.integer  "tag_id"
571    t.integer  "taggable_id"
572    t.string   "taggable_type", limit: 127
573    t.integer  "tagger_id"
574    t.string   "tagger_type",   limit: 127
575    t.string   "context",       limit: 127
576    t.datetime "created_at"
577  end
578
579  add_index "taggings", ["created_at"], name: "index_taggings_on_created_at", using: :btree
580  add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree
581  add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
582  add_index "taggings", ["taggable_id", "taggable_type", "tag_id"], name: "index_taggings_uniquely", unique: true, using: :btree
583
584  create_table "tags", force: :cascade do |t|
585    t.string  "name"
586    t.integer "taggings_count", default: 0
587  end
588
589  add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree
590
591  create_table "user_preferences", force: :cascade do |t|
592    t.string   "email_type"
593    t.integer  "user_id"
594    t.datetime "created_at", null: false
595    t.datetime "updated_at", null: false
596  end
597
598  create_table "users", force: :cascade do |t|
599    t.string   "username"
600    t.text     "serialized_private_key"
601    t.boolean  "getting_started",                                default: true,  null: false
602    t.boolean  "disable_mail",                                   default: false, null: false
603    t.string   "language"
604    t.string   "email",                                          default: "",    null: false
605    t.string   "encrypted_password",                             default: "",    null: false
606    t.string   "invitation_token",                   limit: 60
607    t.datetime "invitation_sent_at"
608    t.string   "reset_password_token"
609    t.datetime "remember_created_at"
610    t.integer  "sign_in_count",                                  default: 0
611    t.datetime "current_sign_in_at"
612    t.datetime "last_sign_in_at"
613    t.string   "current_sign_in_ip"
614    t.string   "last_sign_in_ip"
615    t.datetime "created_at",                                                     null: false
616    t.datetime "updated_at",                                                     null: false
617    t.string   "invitation_service",                 limit: 127
618    t.string   "invitation_identifier",              limit: 127
619    t.integer  "invitation_limit"
620    t.integer  "invited_by_id"
621    t.string   "invited_by_type"
622    t.string   "authentication_token",               limit: 30
623    t.string   "unconfirmed_email"
624    t.string   "confirm_email_token",                limit: 30
625    t.datetime "locked_at"
626    t.boolean  "show_community_spotlight_in_stream",             default: true,  null: false
627    t.boolean  "auto_follow_back",                               default: false
628    t.integer  "auto_follow_back_aspect_id"
629    t.text     "hidden_shareables"
630    t.datetime "reset_password_sent_at"
631    t.datetime "last_seen"
632    t.datetime "remove_after"
633    t.string   "export"
634    t.datetime "exported_at"
635    t.boolean  "exporting",                                      default: false
636    t.boolean  "strip_exif",                                     default: true
637    t.string   "exported_photos_file"
638    t.datetime "exported_photos_at"
639    t.boolean  "exporting_photos",                               default: false
640    t.string   "confirmation_token"
641    t.datetime "confirmed_at"
642    t.datetime "confirmation_sent_at"
643  end
644
645  add_index "users", ["authentication_token"], name: "index_users_on_authentication_token", unique: true, using: :btree
646  add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true, using: :btree
647  add_index "users", ["email"], name: "index_users_on_email", using: :btree
648  add_index "users", ["invitation_service", "invitation_identifier"], name: "index_users_on_invitation_service_and_invitation_identifier", unique: true, using: :btree
649  add_index "users", ["invitation_token"], name: "index_users_on_invitation_token", using: :btree
650  add_index "users", ["username"], name: "index_users_on_username", unique: true, using: :btree
651
652  add_foreign_key "aspect_memberships", "aspects", name: "aspect_memberships_aspect_id_fk", on_delete: :cascade
653  add_foreign_key "aspect_memberships", "contacts", name: "aspect_memberships_contact_id_fk", on_delete: :cascade
654  add_foreign_key "aspect_visibilities", "aspects", name: "aspect_visibilities_aspect_id_fk", on_delete: :cascade
655  add_foreign_key "aspects", "areas"
656  add_foreign_key "comments", "people", column: "author_id", name: "comments_author_id_fk", on_delete: :cascade
657  add_foreign_key "contacts", "people", name: "contacts_person_id_fk", on_delete: :cascade
658  add_foreign_key "conversation_visibilities", "conversations", name: "conversation_visibilities_conversation_id_fk", on_delete: :cascade
659  add_foreign_key "conversation_visibilities", "people", name: "conversation_visibilities_person_id_fk", on_delete: :cascade
660  add_foreign_key "conversations", "people", column: "author_id", name: "conversations_author_id_fk", on_delete: :cascade
661  add_foreign_key "invitations", "users", column: "recipient_id", name: "invitations_recipient_id_fk", on_delete: :cascade
662  add_foreign_key "invitations", "users", column: "sender_id", name: "invitations_sender_id_fk", on_delete: :cascade
663  add_foreign_key "likes", "people", column: "author_id", name: "likes_author_id_fk", on_delete: :cascade
664  add_foreign_key "messages", "conversations", name: "messages_conversation_id_fk", on_delete: :cascade
665  add_foreign_key "messages", "people", column: "author_id", name: "messages_author_id_fk", on_delete: :cascade
666  add_foreign_key "notification_actors", "notifications", name: "notification_actors_notification_id_fk", on_delete: :cascade
667  add_foreign_key "poll_acuerdos", "polls"
668  add_foreign_key "poll_asistentes", "polls"
669  add_foreign_key "poll_asuntos", "polls"
670  add_foreign_key "poll_puntos", "polls"
671  add_foreign_key "poll_responsables", "polls"
672  add_foreign_key "polls", "polls"
673  add_foreign_key "posts", "people", column: "author_id", name: "posts_author_id_fk", on_delete: :cascade
674  add_foreign_key "profiles", "people", name: "profiles_person_id_fk", on_delete: :cascade
675  add_foreign_key "services", "users", name: "services_user_id_fk", on_delete: :cascade
676  add_foreign_key "share_visibilities", "contacts", name: "post_visibilities_contact_id_fk", on_delete: :cascade
677end
Note: See TracBrowser for help on using the repository browser.