dm_forum 4.2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (185) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +23 -0
  3. data/README.md +33 -0
  4. data/Rakefile +30 -0
  5. data/app/assets/javascripts/dm_forum/admin.js +20 -0
  6. data/app/assets/javascripts/dm_forum/application.js +16 -0
  7. data/app/assets/javascripts/dm_forum/dm_forum.js +3 -0
  8. data/app/assets/stylesheets/dm_forum/admin.css +2 -0
  9. data/app/assets/stylesheets/dm_forum/application.css +12 -0
  10. data/app/controllers/dm_forum/admin/admin_controller.rb +13 -0
  11. data/app/controllers/dm_forum/admin/dashboard_controller.rb +12 -0
  12. data/app/controllers/dm_forum/admin/forum_categories_controller.rb +80 -0
  13. data/app/controllers/dm_forum/admin/forum_sites_controller.rb +40 -0
  14. data/app/controllers/dm_forum/admin/forums_controller.rb +113 -0
  15. data/app/controllers/dm_forum/application_controller.rb +25 -0
  16. data/app/controllers/dm_forum/forum_comments_controller.rb +88 -0
  17. data/app/controllers/dm_forum/forum_topics_controller.rb +93 -0
  18. data/app/controllers/dm_forum/forums_controller.rb +45 -0
  19. data/app/datatables/forum_user_datatable.rb +79 -0
  20. data/app/helpers/dm_forum/application_helper.rb +5 -0
  21. data/app/helpers/dm_forum/forum_helper.rb +109 -0
  22. data/app/mailers/forum_notification_mailer.rb +27 -0
  23. data/app/models/dm_forum/concerns/ability.rb +50 -0
  24. data/app/models/dm_forum/concerns/user.rb +37 -0
  25. data/app/models/dm_forum/permitted_params.rb +38 -0
  26. data/app/models/forum.rb +74 -0
  27. data/app/models/forum_category.rb +14 -0
  28. data/app/models/forum_comment.rb +93 -0
  29. data/app/models/forum_site.rb +27 -0
  30. data/app/models/forum_topic.rb +146 -0
  31. data/app/presenters/forum_comment_presenter.rb +8 -0
  32. data/app/presenters/forum_common_presenter.rb +31 -0
  33. data/app/presenters/forum_presenter.rb +14 -0
  34. data/app/views/dm_forum/admin/dashboard/_widget_forum_comments.html.erb +38 -0
  35. data/app/views/dm_forum/admin/dashboard/widget_forum_comments.js.erb +1 -0
  36. data/app/views/dm_forum/admin/forum_categories/_content_toolbar.html.erb +5 -0
  37. data/app/views/dm_forum/admin/forum_categories/_form.html.erb +18 -0
  38. data/app/views/dm_forum/admin/forum_categories/edit.html.erb +3 -0
  39. data/app/views/dm_forum/admin/forum_categories/index.html.erb +25 -0
  40. data/app/views/dm_forum/admin/forum_categories/new.html.erb +3 -0
  41. data/app/views/dm_forum/admin/forum_categories/show.html.erb +41 -0
  42. data/app/views/dm_forum/admin/forum_sites/_form.html.erb +18 -0
  43. data/app/views/dm_forum/admin/forum_sites/edit.html.erb +2 -0
  44. data/app/views/dm_forum/admin/forum_sites/show.html.erb +12 -0
  45. data/app/views/dm_forum/admin/forums/_content_toolbar.html.erb +5 -0
  46. data/app/views/dm_forum/admin/forums/_form.html.erb +24 -0
  47. data/app/views/dm_forum/admin/forums/edit.html.erb +2 -0
  48. data/app/views/dm_forum/admin/forums/new.html.erb +2 -0
  49. data/app/views/dm_forum/admin/forums/show.html.erb +68 -0
  50. data/app/views/dm_forum/forum_comments/_formatting.html.erb +12 -0
  51. data/app/views/dm_forum/forum_comments/edit.html.erb +15 -0
  52. data/app/views/dm_forum/forum_topics/_comment_item.html.erb +26 -0
  53. data/app/views/dm_forum/forum_topics/_comments_list.html.erb +63 -0
  54. data/app/views/dm_forum/forum_topics/_follow_button.html.erb +3 -0
  55. data/app/views/dm_forum/forum_topics/_form.html.erb +24 -0
  56. data/app/views/dm_forum/forum_topics/edit.html.erb +13 -0
  57. data/app/views/dm_forum/forum_topics/new.html.erb +13 -0
  58. data/app/views/dm_forum/forum_topics/show.html.erb +49 -0
  59. data/app/views/dm_forum/forum_topics/toggle_follow.js.coffee +5 -0
  60. data/app/views/dm_forum/forums/_category_side_list.html.erb +28 -0
  61. data/app/views/dm_forum/forums/_forum_header.html.erb +14 -0
  62. data/app/views/dm_forum/forums/_no_forums.html.erb +1 -0
  63. data/app/views/dm_forum/forums/_topics_list.html.erb +86 -0
  64. data/app/views/dm_forum/forums/categories.html.erb +32 -0
  65. data/app/views/dm_forum/forums/list.html.erb +10 -0
  66. data/app/views/dm_forum/forums/show.html.erb +39 -0
  67. data/app/views/layouts/email_templates/forum_notification.html.erb +15 -0
  68. data/app/views/layouts/email_templates/forum_notification.text.erb +16 -0
  69. data/config/initializers/dm_forum.rb +0 -0
  70. data/config/locales/fms.cs.yml +104 -0
  71. data/config/locales/fms.de.yml +104 -0
  72. data/config/locales/fms.en.yml +104 -0
  73. data/config/locales/fms.fi.yml +104 -0
  74. data/config/locales/fms.ja.yml +104 -0
  75. data/config/routes.rb +43 -0
  76. data/db/migrate/20130103151149_create_forums.rb +72 -0
  77. data/db/migrate/20130424125513_add_public_forum.rb +13 -0
  78. data/db/migrate/20130430084925_add_forum_category.rb +7 -0
  79. data/db/migrate/20140201112134_delete_monitorships.rb +17 -0
  80. data/db/migrate/20140303121325_add_requires_subscription_forum.rb +5 -0
  81. data/db/migrate/20140423113420_add_forum_owner.rb +6 -0
  82. data/db/migrate/20160821150125_index_foreign_keys_in_fms_forum_sites.rb +5 -0
  83. data/db/migrate/20160821150126_index_foreign_keys_in_fms_forum_topics.rb +9 -0
  84. data/db/migrate/20160821150127_index_foreign_keys_in_fms_forums.rb +7 -0
  85. data/lib/dm_forum/engine.rb +9 -0
  86. data/lib/dm_forum/version.rb +3 -0
  87. data/lib/dm_forum.rb +4 -0
  88. data/lib/tasks/dm_forum_tasks.rake +4 -0
  89. data/spec/dummy/README.rdoc +28 -0
  90. data/spec/dummy/Rakefile +6 -0
  91. data/spec/dummy/app/assets/javascripts/application.js +13 -0
  92. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  93. data/spec/dummy/app/controllers/application_controller.rb +5 -0
  94. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  95. data/spec/dummy/app/models/ability.rb +12 -0
  96. data/spec/dummy/app/models/user.rb +6 -0
  97. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  98. data/spec/dummy/bin/bundle +3 -0
  99. data/spec/dummy/bin/rails +4 -0
  100. data/spec/dummy/bin/rake +4 -0
  101. data/spec/dummy/config/application.rb +26 -0
  102. data/spec/dummy/config/boot.rb +5 -0
  103. data/spec/dummy/config/database.yml +25 -0
  104. data/spec/dummy/config/environment.rb +5 -0
  105. data/spec/dummy/config/environments/development.rb +37 -0
  106. data/spec/dummy/config/environments/production.rb +82 -0
  107. data/spec/dummy/config/environments/test.rb +39 -0
  108. data/spec/dummy/config/initializers/assets.rb +8 -0
  109. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  110. data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
  111. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  112. data/spec/dummy/config/initializers/inflections.rb +16 -0
  113. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  114. data/spec/dummy/config/initializers/session_store.rb +3 -0
  115. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  116. data/spec/dummy/config/locales/en.yml +23 -0
  117. data/spec/dummy/config/routes.rb +17 -0
  118. data/spec/dummy/config/secrets.yml +22 -0
  119. data/spec/dummy/config.ru +4 -0
  120. data/spec/dummy/db/development.sqlite3 +0 -0
  121. data/spec/dummy/db/migrate/20141114170927_add_globalize_countries.dm_core.rb +50 -0
  122. data/spec/dummy/db/migrate/20141114170928_devise_create_users.dm_core.rb +46 -0
  123. data/spec/dummy/db/migrate/20141114170929_add_user_fields.dm_core.rb +14 -0
  124. data/spec/dummy/db/migrate/20141114170930_rolify_create_roles.dm_core.rb +20 -0
  125. data/spec/dummy/db/migrate/20141114170931_add_last_access.dm_core.rb +10 -0
  126. data/spec/dummy/db/migrate/20141114170932_create_versions.dm_core.rb +19 -0
  127. data/spec/dummy/db/migrate/20141114170933_add_object_changes_column_to_versions.dm_core.rb +12 -0
  128. data/spec/dummy/db/migrate/20141114170934_create_dm_core_accounts.dm_core.rb +13 -0
  129. data/spec/dummy/db/migrate/20141114170935_add_account_to_users.dm_core.rb +9 -0
  130. data/spec/dummy/db/migrate/20141114170936_create_preferences.dm_core.rb +13 -0
  131. data/spec/dummy/db/migrate/20141114170937_create_comments.dm_core.rb +22 -0
  132. data/spec/dummy/db/migrate/20141114170938_add_activity.dm_core.rb +21 -0
  133. data/spec/dummy/db/migrate/20141114170939_add_type_to_comments.dm_core.rb +9 -0
  134. data/spec/dummy/db/migrate/20141114170940_add_category.dm_core.rb +28 -0
  135. data/spec/dummy/db/migrate/20141114170941_create_email_table.dm_core.rb +26 -0
  136. data/spec/dummy/db/migrate/20141114170942_add_user_profile.dm_core.rb +46 -0
  137. data/spec/dummy/db/migrate/20141114170943_add_profile_email.dm_core.rb +14 -0
  138. data/spec/dummy/db/migrate/20141114170944_create_payment_history.dm_core.rb +37 -0
  139. data/spec/dummy/db/migrate/20141114170945_change_anchor_field.dm_core.rb +10 -0
  140. data/spec/dummy/db/migrate/20141114170946_create_user_site_profile.dm_core.rb +27 -0
  141. data/spec/dummy/db/migrate/20141114170947_add_avatar.dm_core.rb +12 -0
  142. data/spec/dummy/db/migrate/20141114170948_add_notify_to_payment_history.dm_core.rb +8 -0
  143. data/spec/dummy/db/migrate/20141114170949_acts_as_votable_migration.dm_core.rb +28 -0
  144. data/spec/dummy/db/migrate/20141114170950_add_user_site_profile_uuid.dm_core.rb +19 -0
  145. data/spec/dummy/db/migrate/20141114170951_add_invoice_id.dm_core.rb +7 -0
  146. data/spec/dummy/db/migrate/20141114170952_acts_as_follower_migration.dm_core.rb +18 -0
  147. data/spec/dummy/db/migrate/20141114170953_rename_invoice_id.dm_core.rb +12 -0
  148. data/spec/dummy/db/migrate/20141114170954_add_core_addresses.dm_core.rb +18 -0
  149. data/spec/dummy/db/migrate/20141114170955_papertrail_increase_column.dm_core.rb +9 -0
  150. data/spec/dummy/db/migrate/20141114170956_acts_as_taggable_on_migration.dm_core.rb +32 -0
  151. data/spec/dummy/db/migrate/20141114170957_add_missing_unique_indices.dm_core.rb +23 -0
  152. data/spec/dummy/db/migrate/20141114170958_add_taggings_counter_cache_to_tags.dm_core.rb +16 -0
  153. data/spec/dummy/db/migrate/20141114170959_create_custom_fields.dm_core.rb +40 -0
  154. data/spec/dummy/db/migrate/20141114170960_add_missing_taggable_index.dm_core.rb +11 -0
  155. data/spec/dummy/db/migrate/20141119112030_create_cms.dm_cms.rb +92 -0
  156. data/spec/dummy/db/migrate/20141119112031_add_account_to_cms.dm_cms.rb +11 -0
  157. data/spec/dummy/db/migrate/20141119112032_create_blog.dm_cms.rb +62 -0
  158. data/spec/dummy/db/migrate/20141119112033_add_notification_sent.dm_cms.rb +6 -0
  159. data/spec/dummy/db/migrate/20141119112034_add_blog_comment.dm_cms.rb +8 -0
  160. data/spec/dummy/db/migrate/20141119112035_add_blog_image.dm_cms.rb +6 -0
  161. data/spec/dummy/db/migrate/20141119112036_rename_snippet_slug.dm_cms.rb +14 -0
  162. data/spec/dummy/db/migrate/20141119112037_add_requires_subscription_blog.dm_cms.rb +8 -0
  163. data/spec/dummy/db/migrate/20141119112038_add_pages_ranked_model.dm_cms.rb +23 -0
  164. data/spec/dummy/db/migrate/20141119112039_add_blog_owner.dm_cms.rb +7 -0
  165. data/spec/dummy/db/migrate/20141119112040_create_media_files.dm_cms.rb +30 -0
  166. data/spec/dummy/db/migrate/20141119112041_add_cmspage_summary.dm_cms.rb +7 -0
  167. data/spec/dummy/db/migrate/20141119112042_add_blog_image_email_header.dm_cms.rb +6 -0
  168. data/spec/dummy/db/migrate/20141119112043_add_header_image.dm_cms.rb +10 -0
  169. data/spec/dummy/db/migrate/20160128144312_add_favored_locale.dm_core.rb +17 -0
  170. data/spec/dummy/db/migrate/20160128144313_update_papertrail_v4.dm_core.rb +41 -0
  171. data/spec/dummy/db/schema.rb +628 -0
  172. data/spec/dummy/public/404.html +67 -0
  173. data/spec/dummy/public/422.html +67 -0
  174. data/spec/dummy/public/500.html +66 -0
  175. data/spec/dummy/public/favicon.ico +0 -0
  176. data/spec/factories/accounts.rb +9 -0
  177. data/spec/factories/user_profiles.rb +10 -0
  178. data/spec/factories/users.rb +19 -0
  179. data/spec/models/forum_spec.rb +9 -0
  180. data/spec/rails_helper.rb +70 -0
  181. data/spec/spec_helper.rb +85 -0
  182. data/spec/support/accounts.rb +17 -0
  183. data/spec/support/devise.rb +44 -0
  184. data/spec/support/fix_locale.rb +57 -0
  185. metadata +337 -0
@@ -0,0 +1,628 @@
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: 20160128144313) do
15
+
16
+ create_table "cms_blog_translations", force: :cascade do |t|
17
+ t.integer "cms_blog_id"
18
+ t.string "locale"
19
+ t.string "title"
20
+ t.datetime "created_at"
21
+ t.datetime "updated_at"
22
+ end
23
+
24
+ add_index "cms_blog_translations", ["cms_blog_id"], name: "index_cms_blog_translations_on_cms_blog_id"
25
+
26
+ create_table "cms_blogs", force: :cascade do |t|
27
+ t.string "slug"
28
+ t.boolean "published", default: false
29
+ t.boolean "is_public", default: false
30
+ t.boolean "requires_login", default: false
31
+ t.integer "row_order"
32
+ t.datetime "updated_on"
33
+ t.datetime "created_on"
34
+ t.integer "account_id"
35
+ t.integer "lock_version", default: 0, null: false
36
+ t.boolean "comments_allowed"
37
+ t.string "header_image"
38
+ t.boolean "requires_subscription", default: false
39
+ t.integer "owner_id"
40
+ t.string "owner_type"
41
+ t.string "image_email_header"
42
+ end
43
+
44
+ add_index "cms_blogs", ["published"], name: "cms_blogs_published_index"
45
+ add_index "cms_blogs", ["slug"], name: "blogname_key"
46
+
47
+ create_table "cms_contentitem_translations", force: :cascade do |t|
48
+ t.integer "cms_contentitem_id"
49
+ t.string "locale"
50
+ t.text "content"
51
+ t.datetime "created_at"
52
+ t.datetime "updated_at"
53
+ end
54
+
55
+ add_index "cms_contentitem_translations", ["cms_contentitem_id"], name: "index_072c3a76f87c96e2f91149eccd2a283dca2b613f"
56
+
57
+ create_table "cms_contentitems", force: :cascade do |t|
58
+ t.integer "cms_page_id"
59
+ t.string "itemtype", limit: 30, default: "textile"
60
+ t.string "container", limit: 30
61
+ t.integer "row_order", default: 0
62
+ t.boolean "enable_cache", default: true, null: false
63
+ t.datetime "created_on"
64
+ t.datetime "updated_on"
65
+ t.integer "lock_version", default: 0
66
+ t.integer "account_id"
67
+ end
68
+
69
+ add_index "cms_contentitems", ["account_id"], name: "index_cms_contentitems_on_account_id"
70
+ add_index "cms_contentitems", ["cms_page_id"], name: "cms_contentitems_cms_page_id_index"
71
+
72
+ create_table "cms_media_file_translations", force: :cascade do |t|
73
+ t.integer "cms_media_file_id"
74
+ t.string "locale"
75
+ t.string "title"
76
+ t.string "description"
77
+ t.datetime "created_at"
78
+ t.datetime "updated_at"
79
+ end
80
+
81
+ add_index "cms_media_file_translations", ["cms_media_file_id"], name: "index_cms_media_file_translations_on_cms_media_file_id"
82
+
83
+ create_table "cms_media_files", force: :cascade do |t|
84
+ t.string "media"
85
+ t.integer "media_file_size"
86
+ t.string "media_content_type"
87
+ t.string "folder"
88
+ t.boolean "generate_retina"
89
+ t.integer "user_id"
90
+ t.datetime "created_at"
91
+ t.datetime "updated_at"
92
+ t.integer "account_id"
93
+ end
94
+
95
+ add_index "cms_media_files", ["media", "folder", "account_id"], name: "index_media_folder_account_id", unique: true
96
+
97
+ create_table "cms_page_translations", force: :cascade do |t|
98
+ t.integer "cms_page_id"
99
+ t.string "locale"
100
+ t.string "title"
101
+ t.string "menutitle"
102
+ t.datetime "created_at"
103
+ t.datetime "updated_at"
104
+ t.text "summary"
105
+ end
106
+
107
+ add_index "cms_page_translations", ["cms_page_id"], name: "index_cms_page_translations_on_cms_page_id"
108
+
109
+ create_table "cms_pages", force: :cascade do |t|
110
+ t.string "slug", limit: 50, default: "", null: false
111
+ t.string "pagetype", limit: 20, default: "content", null: false
112
+ t.boolean "published", default: false, null: false
113
+ t.string "template", limit: 50, default: "", null: false
114
+ t.string "link", default: "", null: false
115
+ t.string "menuimage"
116
+ t.boolean "requires_login", default: false
117
+ t.string "ancestry"
118
+ t.integer "ancestry_depth", default: 0
119
+ t.datetime "updated_on"
120
+ t.datetime "created_on"
121
+ t.integer "lock_version", default: 0, null: false
122
+ t.integer "account_id"
123
+ t.boolean "requires_subscription", default: false
124
+ t.boolean "is_public", default: true
125
+ t.integer "row_order"
126
+ t.string "featured_image"
127
+ t.string "header_image"
128
+ end
129
+
130
+ add_index "cms_pages", ["account_id"], name: "index_cms_pages_on_account_id"
131
+ add_index "cms_pages", ["ancestry"], name: "index_cms_pages_on_ancestry"
132
+ add_index "cms_pages", ["ancestry_depth"], name: "index_cms_pages_on_ancestry_depth"
133
+ add_index "cms_pages", ["published"], name: "cms_pages_published_index"
134
+ add_index "cms_pages", ["slug"], name: "pagename_key"
135
+
136
+ create_table "cms_post_translations", force: :cascade do |t|
137
+ t.integer "cms_post_id"
138
+ t.string "locale"
139
+ t.string "title"
140
+ t.text "content"
141
+ t.text "summary"
142
+ t.datetime "created_at"
143
+ t.datetime "updated_at"
144
+ end
145
+
146
+ add_index "cms_post_translations", ["cms_post_id"], name: "index_cms_post_translations_on_cms_post_id"
147
+
148
+ create_table "cms_posts", force: :cascade do |t|
149
+ t.string "slug"
150
+ t.integer "cms_blog_id"
151
+ t.string "featured_image"
152
+ t.datetime "published_on"
153
+ t.datetime "updated_on"
154
+ t.datetime "created_on"
155
+ t.integer "account_id"
156
+ t.integer "lock_version", default: 0, null: false
157
+ t.datetime "notification_sent_on"
158
+ t.integer "comments_count", default: 0
159
+ t.boolean "comments_allowed"
160
+ end
161
+
162
+ add_index "cms_posts", ["published_on"], name: "cms_posts_published_index"
163
+ add_index "cms_posts", ["slug"], name: "postname_key"
164
+
165
+ create_table "cms_snippet_translations", force: :cascade do |t|
166
+ t.integer "cms_snippet_id"
167
+ t.string "locale"
168
+ t.text "content"
169
+ t.datetime "created_at"
170
+ t.datetime "updated_at"
171
+ end
172
+
173
+ add_index "cms_snippet_translations", ["cms_snippet_id"], name: "index_cms_snippet_translations_on_cms_snippet_id"
174
+
175
+ create_table "cms_snippets", force: :cascade do |t|
176
+ t.string "itemtype", limit: 30, default: "markdown"
177
+ t.string "slug"
178
+ t.string "description"
179
+ t.boolean "enable_cache", default: true, null: false
180
+ t.boolean "published", default: true, null: false
181
+ t.datetime "created_on"
182
+ t.datetime "updated_on"
183
+ t.integer "lock_version", default: 0
184
+ t.integer "account_id"
185
+ end
186
+
187
+ add_index "cms_snippets", ["account_id"], name: "index_cms_snippets_on_account_id"
188
+ add_index "cms_snippets", ["slug"], name: "index_cms_snippets_on_slug"
189
+
190
+ create_table "core_accounts", force: :cascade do |t|
191
+ t.string "company_name"
192
+ t.string "contact_email"
193
+ t.string "domain"
194
+ t.string "account_prefix"
195
+ t.integer "default_site_id"
196
+ t.datetime "created_at"
197
+ t.datetime "updated_at"
198
+ t.integer "next_invoice_num", default: 1000
199
+ end
200
+
201
+ create_table "core_activities", force: :cascade do |t|
202
+ t.integer "account_id"
203
+ t.integer "user_id"
204
+ t.string "browser"
205
+ t.string "session_id"
206
+ t.string "ip_address"
207
+ t.string "controller"
208
+ t.string "action"
209
+ t.string "params"
210
+ t.string "slug"
211
+ t.string "lesson"
212
+ t.datetime "created_at"
213
+ end
214
+
215
+ add_index "core_activities", ["account_id"], name: "index_core_activities_on_account_id"
216
+ add_index "core_activities", ["user_id"], name: "index_core_activities_on_user_id"
217
+
218
+ create_table "core_addresses", force: :cascade do |t|
219
+ t.string "line1"
220
+ t.string "line2"
221
+ t.string "city"
222
+ t.string "state"
223
+ t.string "zip"
224
+ t.string "country_code", limit: 2
225
+ t.integer "addressable_id"
226
+ t.string "addressable_type"
227
+ t.datetime "created_at"
228
+ t.datetime "updated_at"
229
+ end
230
+
231
+ add_index "core_addresses", ["addressable_type", "addressable_id"], name: "index_core_addresses_on_addressable_type_and_addressable_id", unique: true
232
+
233
+ create_table "core_categories", force: :cascade do |t|
234
+ t.string "type"
235
+ t.integer "row_order"
236
+ t.integer "account_id"
237
+ t.datetime "created_on"
238
+ t.datetime "updated_on"
239
+ end
240
+
241
+ create_table "core_category_translations", force: :cascade do |t|
242
+ t.integer "core_category_id"
243
+ t.string "locale"
244
+ t.string "name"
245
+ t.string "description"
246
+ t.datetime "created_at"
247
+ t.datetime "updated_at"
248
+ end
249
+
250
+ add_index "core_category_translations", ["core_category_id"], name: "index_category_translation"
251
+
252
+ create_table "core_comments", force: :cascade do |t|
253
+ t.string "title", limit: 50, default: ""
254
+ t.text "body"
255
+ t.integer "commentable_id"
256
+ t.string "commentable_type"
257
+ t.integer "user_id"
258
+ t.string "role", default: "comments"
259
+ t.integer "account_id"
260
+ t.datetime "created_at"
261
+ t.datetime "updated_at"
262
+ t.string "type"
263
+ t.string "ancestry"
264
+ t.integer "ancestry_depth", default: 0
265
+ end
266
+
267
+ add_index "core_comments", ["commentable_id"], name: "index_core_comments_on_commentable_id"
268
+ add_index "core_comments", ["commentable_type"], name: "index_core_comments_on_commentable_type"
269
+ add_index "core_comments", ["user_id"], name: "index_core_comments_on_user_id"
270
+
271
+ create_table "core_custom_field_def_translations", force: :cascade do |t|
272
+ t.integer "core_custom_field_def_id"
273
+ t.string "locale"
274
+ t.string "label"
275
+ t.text "description"
276
+ t.datetime "created_at"
277
+ t.datetime "updated_at"
278
+ end
279
+
280
+ add_index "core_custom_field_def_translations", ["core_custom_field_def_id"], name: "core_custom_field_def_translations_index"
281
+
282
+ create_table "core_custom_field_defs", force: :cascade do |t|
283
+ t.integer "owner_id"
284
+ t.string "owner_type"
285
+ t.string "name"
286
+ t.string "field_type"
287
+ t.integer "row_order"
288
+ t.boolean "required", default: false
289
+ t.string "properties", limit: 2048
290
+ t.datetime "created_at"
291
+ t.datetime "updated_at"
292
+ t.integer "account_id"
293
+ end
294
+
295
+ add_index "core_custom_field_defs", ["account_id"], name: "index_core_custom_field_defs_on_account_id"
296
+ add_index "core_custom_field_defs", ["owner_id", "owner_type"], name: "index_core_custom_field_defs_on_owner_id_and_owner_type"
297
+
298
+ create_table "core_custom_fields", force: :cascade do |t|
299
+ t.integer "owner_id"
300
+ t.string "owner_type"
301
+ t.integer "custom_field_def_id"
302
+ t.string "field_data", limit: 4096
303
+ t.datetime "created_at"
304
+ t.datetime "updated_at"
305
+ t.integer "account_id"
306
+ end
307
+
308
+ add_index "core_custom_fields", ["account_id"], name: "index_core_custom_fields_on_account_id"
309
+ add_index "core_custom_fields", ["owner_id", "owner_type"], name: "index_core_custom_fields_on_owner_id_and_owner_type"
310
+
311
+ create_table "core_payment_histories", force: :cascade do |t|
312
+ t.integer "owner_id"
313
+ t.string "owner_type", limit: 30
314
+ t.string "anchor_id", limit: 20
315
+ t.string "order_ref"
316
+ t.string "item_ref"
317
+ t.string "item_name"
318
+ t.integer "quantity"
319
+ t.string "cost"
320
+ t.string "discount"
321
+ t.integer "total_cents"
322
+ t.string "total_currency", limit: 3
323
+ t.string "payment_method"
324
+ t.datetime "payment_date"
325
+ t.string "bill_to_name"
326
+ t.text "item_details"
327
+ t.text "order_details"
328
+ t.string "status"
329
+ t.integer "user_profile_id"
330
+ t.datetime "created_on"
331
+ t.integer "account_id"
332
+ t.text "notify_data"
333
+ t.string "transaction_id"
334
+ end
335
+
336
+ add_index "core_payment_histories", ["anchor_id"], name: "index_payment_histories_on_anchor_id"
337
+ add_index "core_payment_histories", ["item_ref"], name: "index_payment_histories_on_item_ref"
338
+ add_index "core_payment_histories", ["order_ref"], name: "index_payment_histories_on_order_ref"
339
+ add_index "core_payment_histories", ["owner_id"], name: "index_payment_histories_on_owner_id"
340
+ add_index "core_payment_histories", ["owner_type"], name: "index_payment_histories_on_owner_type"
341
+
342
+ create_table "core_system_email_translations", force: :cascade do |t|
343
+ t.integer "core_system_email_id"
344
+ t.string "locale"
345
+ t.string "subject"
346
+ t.text "body"
347
+ t.datetime "created_at"
348
+ t.datetime "updated_at"
349
+ end
350
+
351
+ create_table "core_system_emails", force: :cascade do |t|
352
+ t.string "email_type"
353
+ t.integer "emailable_id"
354
+ t.string "emailable_type"
355
+ t.datetime "created_at"
356
+ t.datetime "updated_at"
357
+ t.integer "account_id"
358
+ end
359
+
360
+ create_table "fms_forum_sites", force: :cascade do |t|
361
+ t.integer "account_id"
362
+ t.boolean "enabled", default: false
363
+ t.datetime "created_at"
364
+ t.datetime "updated_at"
365
+ t.integer "forum_topics_count", default: 0
366
+ t.integer "comments_count", default: 0
367
+ t.integer "users_count", default: 0
368
+ t.text "description"
369
+ t.text "tagline"
370
+ end
371
+
372
+ create_table "fms_forum_topics", force: :cascade do |t|
373
+ t.integer "account_id"
374
+ t.integer "forum_id"
375
+ t.integer "user_id"
376
+ t.string "title"
377
+ t.datetime "created_at"
378
+ t.datetime "updated_at"
379
+ t.integer "hits", default: 0
380
+ t.boolean "sticky", default: false
381
+ t.integer "comments_count", default: 0
382
+ t.boolean "locked", default: false
383
+ t.integer "last_forum_comment_id"
384
+ t.datetime "last_updated_at"
385
+ t.integer "last_user_id"
386
+ t.integer "forum_site_id"
387
+ t.string "slug"
388
+ end
389
+
390
+ add_index "fms_forum_topics", ["account_id", "forum_id", "slug"], name: "index_fms_forum_topics_on_account_id_and_forum_id_and_slug"
391
+ add_index "fms_forum_topics", ["account_id", "last_updated_at", "forum_id"], name: "index_forum_topics_last_updated_at_forum_id"
392
+ add_index "fms_forum_topics", ["account_id", "sticky", "last_updated_at", "forum_id"], name: "index_forum_topics_sticky_last_updated_at_forum_id"
393
+
394
+ create_table "fms_forums", force: :cascade do |t|
395
+ t.integer "account_id"
396
+ t.integer "forum_site_id"
397
+ t.string "name"
398
+ t.text "description"
399
+ t.integer "forum_topics_count", default: 0
400
+ t.integer "comments_count", default: 0
401
+ t.integer "row_order", default: 0
402
+ t.text "description_html"
403
+ t.boolean "published", default: false
404
+ t.string "slug"
405
+ t.boolean "is_public", default: false
406
+ t.boolean "requires_login", default: false
407
+ t.integer "forum_category_id"
408
+ t.boolean "requires_subscription", default: false
409
+ t.integer "owner_id"
410
+ t.string "owner_type"
411
+ end
412
+
413
+ add_index "fms_forums", ["account_id", "slug"], name: "index_fms_forums_on_account_id_and_slug"
414
+
415
+ create_table "follows", force: :cascade do |t|
416
+ t.integer "followable_id", null: false
417
+ t.string "followable_type", null: false
418
+ t.integer "follower_id", null: false
419
+ t.string "follower_type", null: false
420
+ t.boolean "blocked", default: false, null: false
421
+ t.datetime "created_at"
422
+ t.datetime "updated_at"
423
+ end
424
+
425
+ add_index "follows", ["followable_id", "followable_type"], name: "fk_followables"
426
+ add_index "follows", ["follower_id", "follower_type"], name: "fk_follows"
427
+
428
+ create_table "globalize_countries", force: :cascade do |t|
429
+ t.string "code", limit: 2
430
+ t.string "english_name"
431
+ t.string "date_format"
432
+ t.string "currency_format"
433
+ t.string "currency_code", limit: 3
434
+ t.string "thousands_sep", limit: 2
435
+ t.string "decimal_sep", limit: 2
436
+ t.string "currency_decimal_sep", limit: 2
437
+ t.string "number_grouping_scheme"
438
+ t.string "continent"
439
+ t.string "locale"
440
+ end
441
+
442
+ add_index "globalize_countries", ["code"], name: "index_globalize_countries_on_code"
443
+ add_index "globalize_countries", ["locale"], name: "index_globalize_countries_on_locale"
444
+
445
+ create_table "globalize_languages", force: :cascade do |t|
446
+ t.string "iso_639_1", limit: 2
447
+ t.string "iso_639_2", limit: 3
448
+ t.string "iso_639_3", limit: 3
449
+ t.string "rfc_3066"
450
+ t.string "english_name"
451
+ t.string "english_name_locale"
452
+ t.string "english_name_modifier"
453
+ t.string "native_name"
454
+ t.string "native_name_locale"
455
+ t.string "native_name_modifier"
456
+ t.boolean "macro_language"
457
+ t.string "direction"
458
+ t.string "pluralization"
459
+ t.string "scope", limit: 1
460
+ end
461
+
462
+ add_index "globalize_languages", ["iso_639_1"], name: "index_globalize_languages_on_iso_639_1"
463
+ add_index "globalize_languages", ["iso_639_2"], name: "index_globalize_languages_on_iso_639_2"
464
+ add_index "globalize_languages", ["iso_639_3"], name: "index_globalize_languages_on_iso_639_3"
465
+ add_index "globalize_languages", ["rfc_3066"], name: "index_globalize_languages_on_rfc_3066"
466
+
467
+ create_table "preferences", force: :cascade do |t|
468
+ t.string "name", null: false
469
+ t.integer "owner_id", null: false
470
+ t.string "owner_type", null: false
471
+ t.integer "group_id"
472
+ t.string "group_type"
473
+ t.string "value"
474
+ t.datetime "created_at"
475
+ t.datetime "updated_at"
476
+ end
477
+
478
+ add_index "preferences", ["owner_id", "owner_type", "name", "group_id", "group_type"], name: "index_preferences_on_owner_and_name_and_preference", unique: true
479
+
480
+ create_table "roles", force: :cascade do |t|
481
+ t.string "name"
482
+ t.integer "resource_id"
483
+ t.string "resource_type"
484
+ t.datetime "created_at"
485
+ t.datetime "updated_at"
486
+ t.integer "account_id"
487
+ end
488
+
489
+ add_index "roles", ["account_id"], name: "index_roles_on_account_id"
490
+ add_index "roles", ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
491
+ add_index "roles", ["name"], name: "index_roles_on_name"
492
+
493
+ create_table "taggings", force: :cascade do |t|
494
+ t.integer "tag_id"
495
+ t.integer "taggable_id"
496
+ t.string "taggable_type"
497
+ t.integer "tagger_id"
498
+ t.string "tagger_type"
499
+ t.string "context", limit: 128
500
+ t.datetime "created_at"
501
+ end
502
+
503
+ add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
504
+ add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
505
+
506
+ create_table "tags", force: :cascade do |t|
507
+ t.string "name"
508
+ t.integer "taggings_count", default: 0
509
+ end
510
+
511
+ add_index "tags", ["name"], name: "index_tags_on_name", unique: true
512
+
513
+ create_table "user_profiles", force: :cascade do |t|
514
+ t.integer "user_id"
515
+ t.string "public_name", limit: 50, default: ""
516
+ t.string "first_name", limit: 50, default: ""
517
+ t.string "last_name", limit: 50, default: ""
518
+ t.string "address", limit: 70, default: ""
519
+ t.string "address2", limit: 70, default: ""
520
+ t.string "city", limit: 30, default: ""
521
+ t.string "state", limit: 30, default: ""
522
+ t.string "zipcode", limit: 10, default: ""
523
+ t.integer "country_id", default: 0
524
+ t.string "phone", limit: 20, default: ""
525
+ t.string "cell", limit: 20, default: ""
526
+ t.string "fax", limit: 20, default: ""
527
+ t.string "workphone", limit: 20, default: ""
528
+ t.string "website", limit: 50, default: ""
529
+ t.string "gender", limit: 1, default: ""
530
+ t.integer "status", default: 0
531
+ t.integer "lock_version", default: 0
532
+ t.datetime "created_at"
533
+ t.datetime "updated_at"
534
+ t.integer "account_id"
535
+ t.string "email"
536
+ t.string "public_avatar"
537
+ t.integer "public_avatar_file_size"
538
+ t.string "public_avatar_content_type"
539
+ t.string "private_avatar"
540
+ t.integer "private_avatar_file_size"
541
+ t.string "private_avatar_content_type"
542
+ t.boolean "use_private_avatar_for_public", default: false
543
+ t.string "favored_locale"
544
+ end
545
+
546
+ create_table "user_site_profiles", force: :cascade do |t|
547
+ t.integer "user_id"
548
+ t.datetime "last_access_at"
549
+ t.datetime "created_at"
550
+ t.datetime "updated_at"
551
+ t.integer "account_id"
552
+ t.string "uuid", limit: 40
553
+ end
554
+
555
+ add_index "user_site_profiles", ["uuid"], name: "index_user_site_profiles_on_uuid"
556
+
557
+ create_table "users", force: :cascade do |t|
558
+ t.string "email", default: "", null: false
559
+ t.string "encrypted_password", default: "", null: false
560
+ t.string "reset_password_token"
561
+ t.datetime "reset_password_sent_at"
562
+ t.datetime "remember_created_at"
563
+ t.integer "sign_in_count", default: 0
564
+ t.datetime "current_sign_in_at"
565
+ t.datetime "last_sign_in_at"
566
+ t.string "current_sign_in_ip"
567
+ t.string "last_sign_in_ip"
568
+ t.string "confirmation_token"
569
+ t.datetime "confirmed_at"
570
+ t.datetime "confirmation_sent_at"
571
+ t.string "unconfirmed_email"
572
+ t.datetime "created_at"
573
+ t.datetime "updated_at"
574
+ t.integer "account_id"
575
+ end
576
+
577
+ add_index "users", ["account_id"], name: "index_users_on_account_id"
578
+ add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
579
+ add_index "users", ["email"], name: "index_users_on_email", unique: true
580
+ add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
581
+
582
+ create_table "users_roles", id: false, force: :cascade do |t|
583
+ t.integer "user_id"
584
+ t.integer "role_id"
585
+ end
586
+
587
+ add_index "users_roles", ["user_id", "role_id"], name: "index_users_roles_on_user_id_and_role_id"
588
+
589
+ create_table "version_associations", force: :cascade do |t|
590
+ t.integer "version_id"
591
+ t.string "foreign_key_name", null: false
592
+ t.integer "foreign_key_id"
593
+ end
594
+
595
+ add_index "version_associations", ["foreign_key_name", "foreign_key_id"], name: "index_version_associations_on_foreign_key"
596
+ add_index "version_associations", ["version_id"], name: "index_version_associations_on_version_id"
597
+
598
+ create_table "versions", force: :cascade do |t|
599
+ t.string "item_type", null: false
600
+ t.integer "item_id", null: false
601
+ t.string "event", null: false
602
+ t.string "whodunnit"
603
+ t.text "object", limit: 1073741823
604
+ t.datetime "created_at"
605
+ t.text "object_changes", limit: 1073741823
606
+ t.string "locale"
607
+ t.integer "transaction_id"
608
+ end
609
+
610
+ add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id"
611
+ add_index "versions", ["transaction_id"], name: "index_versions_on_transaction_id"
612
+
613
+ create_table "votes", force: :cascade do |t|
614
+ t.integer "votable_id"
615
+ t.string "votable_type"
616
+ t.integer "voter_id"
617
+ t.string "voter_type"
618
+ t.boolean "vote_flag"
619
+ t.string "vote_scope"
620
+ t.integer "vote_weight"
621
+ t.datetime "created_at"
622
+ t.datetime "updated_at"
623
+ end
624
+
625
+ add_index "votes", ["votable_id", "votable_type", "vote_scope"], name: "index_votes_on_votable_id_and_votable_type_and_vote_scope"
626
+ add_index "votes", ["voter_id", "voter_type", "vote_scope"], name: "index_votes_on_voter_id_and_voter_type_and_vote_scope"
627
+
628
+ end