Commit 05915dacc6ae0e81da3c31deca1861463d8a7a5c
1 parent
6f6dfc33
Exists in
production
adding load proposal script
Showing
10 changed files
with
300 additions
and
245 deletions
Show diff stats
Gemfile.lock
@@ -54,7 +54,7 @@ GEM | @@ -54,7 +54,7 @@ GEM | ||
54 | rack (>= 1.0.0) | 54 | rack (>= 1.0.0) |
55 | rack-test (>= 0.5.4) | 55 | rack-test (>= 0.5.4) |
56 | xpath (~> 2.0) | 56 | xpath (~> 2.0) |
57 | - childprocess (0.5.6) | 57 | + childprocess (0.5.8) |
58 | ffi (~> 1.0, >= 1.0.11) | 58 | ffi (~> 1.0, >= 1.0.11) |
59 | chronic (0.10.2) | 59 | chronic (0.10.2) |
60 | coercible (1.0.0) | 60 | coercible (1.0.0) |
@@ -107,7 +107,7 @@ GEM | @@ -107,7 +107,7 @@ GEM | ||
107 | grape-swagger (0.10.2) | 107 | grape-swagger (0.10.2) |
108 | grape (>= 0.8.0) | 108 | grape (>= 0.8.0) |
109 | grape-entity | 109 | grape-entity |
110 | - hashie (3.4.2) | 110 | + hashie (3.4.3) |
111 | hike (1.2.3) | 111 | hike (1.2.3) |
112 | i18n (0.7.0) | 112 | i18n (0.7.0) |
113 | ice_nine (0.11.1) | 113 | ice_nine (0.11.1) |
@@ -127,14 +127,14 @@ GEM | @@ -127,14 +127,14 @@ GEM | ||
127 | ambry (~> 0.3.0) | 127 | ambry (~> 0.3.0) |
128 | metaclass (0.0.4) | 128 | metaclass (0.0.4) |
129 | mime-types (1.25.1) | 129 | mime-types (1.25.1) |
130 | - mini_portile (0.6.2) | 130 | + mini_portile2 (2.0.0) |
131 | minitest (3.2.0) | 131 | minitest (3.2.0) |
132 | mocha (1.1.0) | 132 | mocha (1.1.0) |
133 | metaclass (~> 0.0.1) | 133 | metaclass (~> 0.0.1) |
134 | multi_json (1.11.2) | 134 | multi_json (1.11.2) |
135 | multi_xml (0.5.5) | 135 | multi_xml (0.5.5) |
136 | - nokogiri (1.6.6.2) | ||
137 | - mini_portile (~> 0.6.0) | 136 | + nokogiri (1.6.7) |
137 | + mini_portile2 (~> 2.0.0.rc2) | ||
138 | pg (0.13.2) | 138 | pg (0.13.2) |
139 | polyglot (0.3.5) | 139 | polyglot (0.3.5) |
140 | rack (1.4.7) | 140 | rack (1.4.7) |
db/schema.rb
@@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
11 | # | 11 | # |
12 | # It's strongly recommended to check this file into your version control system. | 12 | # It's strongly recommended to check this file into your version control system. |
13 | 13 | ||
14 | -ActiveRecord::Schema.define(:version => 20150918005035) do | 14 | +ActiveRecord::Schema.define(:version => 20151105175319) do |
15 | 15 | ||
16 | create_table "abuse_reports", :force => true do |t| | 16 | create_table "abuse_reports", :force => true do |t| |
17 | t.integer "reporter_id" | 17 | t.integer "reporter_id" |
@@ -24,15 +24,15 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -24,15 +24,15 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
24 | 24 | ||
25 | create_table "action_tracker", :force => true do |t| | 25 | create_table "action_tracker", :force => true do |t| |
26 | t.integer "user_id" | 26 | t.integer "user_id" |
27 | - t.string "user_type" | 27 | + t.string "user_type", :limit => nil |
28 | t.integer "target_id" | 28 | t.integer "target_id" |
29 | - t.string "target_type" | 29 | + t.string "target_type", :limit => nil |
30 | t.text "params" | 30 | t.text "params" |
31 | - t.string "verb" | 31 | + t.string "verb", :limit => nil |
32 | t.datetime "created_at" | 32 | t.datetime "created_at" |
33 | t.datetime "updated_at" | 33 | t.datetime "updated_at" |
34 | - t.integer "comments_count", :default => 0 | ||
35 | - t.boolean "visible", :default => true | 34 | + t.integer "comments_count", :default => 0 |
35 | + t.boolean "visible", :default => true | ||
36 | end | 36 | end |
37 | 37 | ||
38 | add_index "action_tracker", ["target_id", "target_type"], :name => "index_action_tracker_on_dispatcher_id_and_dispatcher_type" | 38 | add_index "action_tracker", ["target_id", "target_type"], :name => "index_action_tracker_on_dispatcher_id_and_dispatcher_type" |
@@ -52,8 +52,8 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -52,8 +52,8 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
52 | t.integer "person_id", :null => false | 52 | t.integer "person_id", :null => false |
53 | t.integer "article_id", :null => false | 53 | t.integer "article_id", :null => false |
54 | t.datetime "since" | 54 | t.datetime "since" |
55 | - t.datetime "created_at", :null => false | ||
56 | - t.datetime "updated_at", :null => false | 55 | + t.datetime "created_at" |
56 | + t.datetime "updated_at" | ||
57 | end | 57 | end |
58 | 58 | ||
59 | add_index "article_followers", ["article_id"], :name => "index_article_followers_on_article_id" | 59 | add_index "article_followers", ["article_id"], :name => "index_article_followers_on_article_id" |
@@ -68,9 +68,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -68,9 +68,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
68 | create_table "article_versions", :force => true do |t| | 68 | create_table "article_versions", :force => true do |t| |
69 | t.integer "article_id" | 69 | t.integer "article_id" |
70 | t.integer "version" | 70 | t.integer "version" |
71 | - t.string "name" | ||
72 | - t.string "slug" | ||
73 | - t.text "path", :default => "" | 71 | + t.string "name", :limit => nil |
72 | + t.string "slug", :limit => nil | ||
73 | + t.text "path", :default => "" | ||
74 | t.integer "parent_id" | 74 | t.integer "parent_id" |
75 | t.text "body" | 75 | t.text "body" |
76 | t.text "abstract" | 76 | t.text "abstract" |
@@ -79,35 +79,35 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -79,35 +79,35 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
79 | t.datetime "created_at" | 79 | t.datetime "created_at" |
80 | t.integer "last_changed_by_id" | 80 | t.integer "last_changed_by_id" |
81 | t.integer "size" | 81 | t.integer "size" |
82 | - t.string "content_type" | ||
83 | - t.string "filename" | 82 | + t.string "content_type", :limit => nil |
83 | + t.string "filename", :limit => nil | ||
84 | t.integer "height" | 84 | t.integer "height" |
85 | t.integer "width" | 85 | t.integer "width" |
86 | - t.string "versioned_type" | 86 | + t.string "versioned_type", :limit => nil |
87 | t.integer "comments_count" | 87 | t.integer "comments_count" |
88 | - t.boolean "advertise", :default => true | ||
89 | - t.boolean "published", :default => true | 88 | + t.boolean "advertise", :default => true |
89 | + t.boolean "published", :default => true | ||
90 | t.datetime "start_date" | 90 | t.datetime "start_date" |
91 | t.datetime "end_date" | 91 | t.datetime "end_date" |
92 | - t.integer "children_count", :default => 0 | ||
93 | - t.boolean "accept_comments", :default => true | 92 | + t.integer "children_count", :default => 0 |
93 | + t.boolean "accept_comments", :default => true | ||
94 | t.integer "reference_article_id" | 94 | t.integer "reference_article_id" |
95 | t.text "setting" | 95 | t.text "setting" |
96 | - t.boolean "notify_comments", :default => false | ||
97 | - t.integer "hits", :default => 0 | 96 | + t.boolean "notify_comments", :default => false |
97 | + t.integer "hits", :default => 0 | ||
98 | t.datetime "published_at" | 98 | t.datetime "published_at" |
99 | - t.string "source" | ||
100 | - t.boolean "highlighted", :default => false | ||
101 | - t.string "external_link" | ||
102 | - t.boolean "thumbnails_processed", :default => false | ||
103 | - t.boolean "is_image", :default => false | 99 | + t.string "source", :limit => nil |
100 | + t.boolean "highlighted", :default => false | ||
101 | + t.string "external_link", :limit => nil | ||
102 | + t.boolean "thumbnails_processed", :default => false | ||
103 | + t.boolean "is_image", :default => false | ||
104 | t.integer "translation_of_id" | 104 | t.integer "translation_of_id" |
105 | - t.string "language" | ||
106 | - t.string "source_name" | 105 | + t.string "language", :limit => nil |
106 | + t.string "source_name", :limit => nil | ||
107 | t.integer "license_id" | 107 | t.integer "license_id" |
108 | t.integer "image_id" | 108 | t.integer "image_id" |
109 | t.integer "position" | 109 | t.integer "position" |
110 | - t.integer "spam_comments_count", :default => 0 | 110 | + t.integer "spam_comments_count", :default => 0 |
111 | t.integer "author_id" | 111 | t.integer "author_id" |
112 | t.integer "created_by_id" | 112 | t.integer "created_by_id" |
113 | t.integer "followers_count" | 113 | t.integer "followers_count" |
@@ -120,9 +120,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -120,9 +120,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
120 | add_index "article_versions", ["published_at", "id"], :name => "index_article_versions_on_published_at_and_id" | 120 | add_index "article_versions", ["published_at", "id"], :name => "index_article_versions_on_published_at_and_id" |
121 | 121 | ||
122 | create_table "articles", :force => true do |t| | 122 | create_table "articles", :force => true do |t| |
123 | - t.string "name" | ||
124 | - t.string "slug" | ||
125 | - t.text "path", :default => "" | 123 | + t.string "name", :limit => nil |
124 | + t.string "slug", :limit => nil | ||
125 | + t.text "path", :default => "" | ||
126 | t.integer "parent_id" | 126 | t.integer "parent_id" |
127 | t.text "body" | 127 | t.text "body" |
128 | t.text "abstract" | 128 | t.text "abstract" |
@@ -131,42 +131,42 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -131,42 +131,42 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
131 | t.datetime "created_at" | 131 | t.datetime "created_at" |
132 | t.integer "last_changed_by_id" | 132 | t.integer "last_changed_by_id" |
133 | t.integer "version" | 133 | t.integer "version" |
134 | - t.string "type" | 134 | + t.string "type", :limit => nil |
135 | t.integer "size" | 135 | t.integer "size" |
136 | - t.string "content_type" | ||
137 | - t.string "filename" | 136 | + t.string "content_type", :limit => nil |
137 | + t.string "filename", :limit => nil | ||
138 | t.integer "height" | 138 | t.integer "height" |
139 | t.integer "width" | 139 | t.integer "width" |
140 | - t.integer "comments_count", :default => 0 | ||
141 | - t.boolean "advertise", :default => true | ||
142 | - t.boolean "published", :default => true | 140 | + t.integer "comments_count", :default => 0 |
141 | + t.boolean "advertise", :default => true | ||
142 | + t.boolean "published", :default => true | ||
143 | t.datetime "start_date" | 143 | t.datetime "start_date" |
144 | t.datetime "end_date" | 144 | t.datetime "end_date" |
145 | - t.integer "children_count", :default => 0 | ||
146 | - t.boolean "accept_comments", :default => true | 145 | + t.integer "children_count", :default => 0 |
146 | + t.boolean "accept_comments", :default => true | ||
147 | t.integer "reference_article_id" | 147 | t.integer "reference_article_id" |
148 | t.text "setting" | 148 | t.text "setting" |
149 | - t.boolean "notify_comments", :default => true | ||
150 | - t.integer "hits", :default => 0 | 149 | + t.boolean "notify_comments", :default => true |
150 | + t.integer "hits", :default => 0 | ||
151 | t.datetime "published_at" | 151 | t.datetime "published_at" |
152 | - t.string "source" | ||
153 | - t.boolean "highlighted", :default => false | ||
154 | - t.string "external_link" | ||
155 | - t.boolean "thumbnails_processed", :default => false | ||
156 | - t.boolean "is_image", :default => false | 152 | + t.string "source", :limit => nil |
153 | + t.boolean "highlighted", :default => false | ||
154 | + t.string "external_link", :limit => nil | ||
155 | + t.boolean "thumbnails_processed", :default => false | ||
156 | + t.boolean "is_image", :default => false | ||
157 | t.integer "translation_of_id" | 157 | t.integer "translation_of_id" |
158 | - t.string "language" | ||
159 | - t.string "source_name" | 158 | + t.string "language", :limit => nil |
159 | + t.string "source_name", :limit => nil | ||
160 | t.integer "license_id" | 160 | t.integer "license_id" |
161 | t.integer "image_id" | 161 | t.integer "image_id" |
162 | t.integer "position" | 162 | t.integer "position" |
163 | - t.integer "spam_comments_count", :default => 0 | 163 | + t.integer "spam_comments_count", :default => 0 |
164 | t.integer "author_id" | 164 | t.integer "author_id" |
165 | t.integer "created_by_id" | 165 | t.integer "created_by_id" |
166 | - t.boolean "show_to_followers", :default => true | 166 | + t.boolean "show_to_followers", :default => true |
167 | t.integer "sash_id" | 167 | t.integer "sash_id" |
168 | - t.integer "level", :default => 0 | ||
169 | - t.integer "followers_count", :default => 0 | 168 | + t.integer "level", :default => 0 |
169 | + t.integer "followers_count", :default => 0 | ||
170 | end | 170 | end |
171 | 171 | ||
172 | add_index "articles", ["comments_count"], :name => "index_articles_on_comments_count" | 172 | add_index "articles", ["comments_count"], :name => "index_articles_on_comments_count" |
@@ -205,16 +205,16 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -205,16 +205,16 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
205 | add_index "badges_sashes", ["sash_id"], :name => "index_badges_sashes_on_sash_id" | 205 | add_index "badges_sashes", ["sash_id"], :name => "index_badges_sashes_on_sash_id" |
206 | 206 | ||
207 | create_table "blocks", :force => true do |t| | 207 | create_table "blocks", :force => true do |t| |
208 | - t.string "title" | 208 | + t.string "title", :limit => nil |
209 | t.integer "box_id" | 209 | t.integer "box_id" |
210 | - t.string "type" | 210 | + t.string "type", :limit => nil |
211 | t.text "settings" | 211 | t.text "settings" |
212 | t.integer "position" | 212 | t.integer "position" |
213 | - t.boolean "enabled", :default => true | 213 | + t.boolean "enabled", :default => true |
214 | t.datetime "created_at" | 214 | t.datetime "created_at" |
215 | t.datetime "updated_at" | 215 | t.datetime "updated_at" |
216 | t.datetime "fetched_at" | 216 | t.datetime "fetched_at" |
217 | - t.boolean "mirror", :default => false | 217 | + t.boolean "mirror", :default => false |
218 | t.integer "mirror_block_id" | 218 | t.integer "mirror_block_id" |
219 | t.integer "observers_id" | 219 | t.integer "observers_id" |
220 | end | 220 | end |
@@ -225,7 +225,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -225,7 +225,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
225 | add_index "blocks", ["type"], :name => "index_blocks_on_type" | 225 | add_index "blocks", ["type"], :name => "index_blocks_on_type" |
226 | 226 | ||
227 | create_table "boxes", :force => true do |t| | 227 | create_table "boxes", :force => true do |t| |
228 | - t.string "owner_type" | 228 | + t.string "owner_type", :limit => nil |
229 | t.integer "owner_id" | 229 | t.integer "owner_id" |
230 | t.integer "position" | 230 | t.integer "position" |
231 | end | 231 | end |
@@ -233,20 +233,20 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -233,20 +233,20 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
233 | add_index "boxes", ["owner_id", "owner_type"], :name => "index_boxes_on_owner_type_and_owner_id" | 233 | add_index "boxes", ["owner_id", "owner_type"], :name => "index_boxes_on_owner_type_and_owner_id" |
234 | 234 | ||
235 | create_table "categories", :force => true do |t| | 235 | create_table "categories", :force => true do |t| |
236 | - t.string "name" | ||
237 | - t.string "slug" | ||
238 | - t.text "path", :default => "" | 236 | + t.string "name", :limit => nil |
237 | + t.string "slug", :limit => nil | ||
238 | + t.text "path", :default => "" | ||
239 | t.integer "environment_id" | 239 | t.integer "environment_id" |
240 | t.integer "parent_id" | 240 | t.integer "parent_id" |
241 | - t.string "type" | 241 | + t.string "type", :limit => nil |
242 | t.float "lat" | 242 | t.float "lat" |
243 | t.float "lng" | 243 | t.float "lng" |
244 | - t.boolean "display_in_menu", :default => false | ||
245 | - t.integer "children_count", :default => 0 | ||
246 | - t.boolean "accept_products", :default => true | 244 | + t.boolean "display_in_menu", :default => false |
245 | + t.integer "children_count", :default => 0 | ||
246 | + t.boolean "accept_products", :default => true | ||
247 | t.integer "image_id" | 247 | t.integer "image_id" |
248 | - t.string "acronym" | ||
249 | - t.string "abbreviation" | 248 | + t.string "acronym", :limit => nil |
249 | + t.string "abbreviation", :limit => nil | ||
250 | t.string "display_color", :limit => 6 | 250 | t.string "display_color", :limit => 6 |
251 | t.text "ancestry" | 251 | t.text "ancestry" |
252 | end | 252 | end |
@@ -263,9 +263,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -263,9 +263,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
263 | add_index "categories_profiles", ["profile_id"], :name => "index_categories_profiles_on_profile_id" | 263 | add_index "categories_profiles", ["profile_id"], :name => "index_categories_profiles_on_profile_id" |
264 | 264 | ||
265 | create_table "certifiers", :force => true do |t| | 265 | create_table "certifiers", :force => true do |t| |
266 | - t.string "name", :null => false | 266 | + t.string "name", :limit => nil, :null => false |
267 | t.text "description" | 267 | t.text "description" |
268 | - t.string "link" | 268 | + t.string "link", :limit => nil |
269 | t.integer "environment_id" | 269 | t.integer "environment_id" |
270 | t.datetime "created_at" | 270 | t.datetime "created_at" |
271 | t.datetime "updated_at" | 271 | t.datetime "updated_at" |
@@ -284,22 +284,22 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -284,22 +284,22 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
284 | add_index "chat_messages", ["to_id"], :name => "index_chat_messages_on_to_id" | 284 | add_index "chat_messages", ["to_id"], :name => "index_chat_messages_on_to_id" |
285 | 285 | ||
286 | create_table "comments", :force => true do |t| | 286 | create_table "comments", :force => true do |t| |
287 | - t.string "title" | 287 | + t.string "title", :limit => nil |
288 | t.text "body" | 288 | t.text "body" |
289 | t.integer "source_id" | 289 | t.integer "source_id" |
290 | t.integer "author_id" | 290 | t.integer "author_id" |
291 | - t.string "name" | ||
292 | - t.string "email" | 291 | + t.string "name", :limit => nil |
292 | + t.string "email", :limit => nil | ||
293 | t.datetime "created_at" | 293 | t.datetime "created_at" |
294 | t.integer "reply_of_id" | 294 | t.integer "reply_of_id" |
295 | - t.string "ip_address" | 295 | + t.string "ip_address", :limit => nil |
296 | t.boolean "spam" | 296 | t.boolean "spam" |
297 | - t.string "source_type" | ||
298 | - t.string "user_agent" | ||
299 | - t.string "referrer" | 297 | + t.string "source_type", :limit => nil |
298 | + t.string "user_agent", :limit => nil | ||
299 | + t.string "referrer", :limit => nil | ||
300 | t.text "settings" | 300 | t.text "settings" |
301 | t.integer "paragraph_id" | 301 | t.integer "paragraph_id" |
302 | - t.string "paragraph_uuid" | 302 | + t.string "paragraph_uuid", :limit => nil |
303 | end | 303 | end |
304 | 304 | ||
305 | add_index "comments", ["paragraph_uuid"], :name => "index_comments_on_paragraph_uuid" | 305 | add_index "comments", ["paragraph_uuid"], :name => "index_comments_on_paragraph_uuid" |
@@ -307,34 +307,62 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -307,34 +307,62 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
307 | 307 | ||
308 | create_table "contact_lists", :force => true do |t| | 308 | create_table "contact_lists", :force => true do |t| |
309 | t.text "list" | 309 | t.text "list" |
310 | - t.string "error_fetching" | ||
311 | - t.boolean "fetched", :default => false | 310 | + t.string "error_fetching", :limit => nil |
311 | + t.boolean "fetched", :default => false | ||
312 | + t.datetime "created_at" | ||
313 | + t.datetime "updated_at" | ||
314 | + end | ||
315 | + | ||
316 | + create_table "custom_field_values", :force => true do |t| | ||
317 | + t.string "customized_type", :limit => nil, :default => "", :null => false | ||
318 | + t.integer "customized_id", :default => 0, :null => false | ||
319 | + t.boolean "public", :default => false, :null => false | ||
320 | + t.integer "custom_field_id", :default => 0, :null => false | ||
321 | + t.text "value", :default => "" | ||
312 | t.datetime "created_at" | 322 | t.datetime "created_at" |
313 | t.datetime "updated_at" | 323 | t.datetime "updated_at" |
314 | end | 324 | end |
315 | 325 | ||
326 | + add_index "custom_field_values", ["customized_type", "customized_id", "custom_field_id"], :name => "index_custom_field_values", :unique => true | ||
327 | + | ||
328 | + create_table "custom_fields", :force => true do |t| | ||
329 | + t.string "name", :limit => nil | ||
330 | + t.string "format", :limit => nil, :default => "" | ||
331 | + t.text "default_value", :default => "" | ||
332 | + t.string "customized_type", :limit => nil | ||
333 | + t.text "extras", :default => "" | ||
334 | + t.boolean "active", :default => false | ||
335 | + t.boolean "required", :default => false | ||
336 | + t.boolean "signup", :default => false | ||
337 | + t.integer "environment_id" | ||
338 | + t.datetime "created_at" | ||
339 | + t.datetime "updated_at" | ||
340 | + end | ||
341 | + | ||
342 | + add_index "custom_fields", ["customized_type", "name", "environment_id"], :name => "index_custom_field", :unique => true | ||
343 | + | ||
316 | create_table "delayed_jobs", :force => true do |t| | 344 | create_table "delayed_jobs", :force => true do |t| |
317 | - t.integer "priority", :default => 0 | ||
318 | - t.integer "attempts", :default => 0 | 345 | + t.integer "priority", :default => 0 |
346 | + t.integer "attempts", :default => 0 | ||
319 | t.text "handler" | 347 | t.text "handler" |
320 | t.text "last_error" | 348 | t.text "last_error" |
321 | t.datetime "run_at" | 349 | t.datetime "run_at" |
322 | t.datetime "locked_at" | 350 | t.datetime "locked_at" |
323 | t.datetime "failed_at" | 351 | t.datetime "failed_at" |
324 | - t.string "locked_by" | 352 | + t.string "locked_by", :limit => nil |
325 | t.datetime "created_at" | 353 | t.datetime "created_at" |
326 | t.datetime "updated_at" | 354 | t.datetime "updated_at" |
327 | - t.string "queue" | 355 | + t.string "queue", :limit => nil |
328 | end | 356 | end |
329 | 357 | ||
330 | add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" | 358 | add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority" |
331 | 359 | ||
332 | create_table "domains", :force => true do |t| | 360 | create_table "domains", :force => true do |t| |
333 | - t.string "name" | ||
334 | - t.string "owner_type" | 361 | + t.string "name", :limit => nil |
362 | + t.string "owner_type", :limit => nil | ||
335 | t.integer "owner_id" | 363 | t.integer "owner_id" |
336 | - t.boolean "is_default", :default => false | ||
337 | - t.string "google_maps_key" | 364 | + t.boolean "is_default", :default => false |
365 | + t.string "google_maps_key", :limit => nil | ||
338 | end | 366 | end |
339 | 367 | ||
340 | add_index "domains", ["is_default"], :name => "index_domains_on_is_default" | 368 | add_index "domains", ["is_default"], :name => "index_domains_on_is_default" |
@@ -354,39 +382,38 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -354,39 +382,38 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
354 | end | 382 | end |
355 | 383 | ||
356 | create_table "environments", :force => true do |t| | 384 | create_table "environments", :force => true do |t| |
357 | - t.string "name" | ||
358 | - t.string "contact_email" | 385 | + t.string "name", :limit => nil |
386 | + t.string "contact_email", :limit => nil | ||
359 | t.boolean "is_default" | 387 | t.boolean "is_default" |
360 | t.text "settings" | 388 | t.text "settings" |
361 | t.text "design_data" | 389 | t.text "design_data" |
362 | t.text "custom_header" | 390 | t.text "custom_header" |
363 | t.text "custom_footer" | 391 | t.text "custom_footer" |
364 | - t.string "theme", :default => "default", :null => false | 392 | + t.string "theme", :limit => nil, :default => "default", :null => false |
365 | t.text "terms_of_use_acceptance_text" | 393 | t.text "terms_of_use_acceptance_text" |
366 | t.datetime "created_at" | 394 | t.datetime "created_at" |
367 | t.datetime "updated_at" | 395 | t.datetime "updated_at" |
368 | - t.integer "reports_lower_bound", :default => 0, :null => false | ||
369 | - t.string "redirection_after_login", :default => "keep_on_same_page" | 396 | + t.integer "reports_lower_bound", :default => 0, :null => false |
397 | + t.string "redirection_after_login", :limit => nil, :default => "keep_on_same_page" | ||
370 | t.text "signup_welcome_text" | 398 | t.text "signup_welcome_text" |
371 | - t.string "languages" | ||
372 | - t.string "default_language" | ||
373 | - t.string "noreply_email" | ||
374 | - t.string "redirection_after_signup", :default => "keep_on_same_page" | ||
375 | - t.text "send_email_plugin_allow_to" | ||
376 | - t.string "date_format", :default => "month_name_with_year" | 399 | + t.string "languages", :limit => nil |
400 | + t.string "default_language", :limit => nil | ||
401 | + t.string "noreply_email", :limit => nil | ||
402 | + t.string "redirection_after_signup", :limit => nil, :default => "keep_on_same_page" | ||
403 | + t.string "date_format", :limit => nil, :default => "month_name_with_year" | ||
377 | end | 404 | end |
378 | 405 | ||
379 | create_table "external_feeds", :force => true do |t| | 406 | create_table "external_feeds", :force => true do |t| |
380 | - t.string "feed_title" | 407 | + t.string "feed_title", :limit => nil |
381 | t.datetime "fetched_at" | 408 | t.datetime "fetched_at" |
382 | t.text "address" | 409 | t.text "address" |
383 | - t.integer "blog_id", :null => false | ||
384 | - t.boolean "enabled", :default => true, :null => false | ||
385 | - t.boolean "only_once", :default => true, :null => false | 410 | + t.integer "blog_id", :null => false |
411 | + t.boolean "enabled", :default => true, :null => false | ||
412 | + t.boolean "only_once", :default => true, :null => false | ||
386 | t.datetime "created_at" | 413 | t.datetime "created_at" |
387 | t.datetime "updated_at" | 414 | t.datetime "updated_at" |
388 | t.text "error_message" | 415 | t.text "error_message" |
389 | - t.integer "update_errors", :default => 0 | 416 | + t.integer "update_errors", :default => 0 |
390 | end | 417 | end |
391 | 418 | ||
392 | add_index "external_feeds", ["blog_id"], :name => "index_external_feeds_on_blog_id" | 419 | add_index "external_feeds", ["blog_id"], :name => "index_external_feeds_on_blog_id" |
@@ -408,7 +435,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -408,7 +435,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
408 | t.integer "person_id" | 435 | t.integer "person_id" |
409 | t.integer "friend_id" | 436 | t.integer "friend_id" |
410 | t.datetime "created_at" | 437 | t.datetime "created_at" |
411 | - t.string "group" | 438 | + t.string "group", :limit => nil |
412 | end | 439 | end |
413 | 440 | ||
414 | add_index "friendships", ["friend_id"], :name => "index_friendships_on_friend_id" | 441 | add_index "friendships", ["friend_id"], :name => "index_friendships_on_friend_id" |
@@ -419,7 +446,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -419,7 +446,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
419 | t.string "name" | 446 | t.string "name" |
420 | t.integer "level" | 447 | t.integer "level" |
421 | t.string "description" | 448 | t.string "description" |
422 | - t.string "custom_fields" | 449 | + t.text "custom_fields" |
423 | t.integer "owner_id" | 450 | t.integer "owner_id" |
424 | t.string "owner_type" | 451 | t.string "owner_type" |
425 | t.datetime "created_at", :null => false | 452 | t.datetime "created_at", :null => false |
@@ -427,16 +454,34 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -427,16 +454,34 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
427 | t.string "title" | 454 | t.string "title" |
428 | end | 455 | end |
429 | 456 | ||
457 | + create_table "gamification_plugin_points_categorizations", :force => true do |t| | ||
458 | + t.integer "profile_id" | ||
459 | + t.integer "point_type_id" | ||
460 | + t.integer "weight" | ||
461 | + t.datetime "created_at", :null => false | ||
462 | + t.datetime "updated_at", :null => false | ||
463 | + end | ||
464 | + | ||
465 | + add_index "gamification_plugin_points_categorizations", ["point_type_id"], :name => "index_points_categorizations_on_point_type_id" | ||
466 | + add_index "gamification_plugin_points_categorizations", ["profile_id"], :name => "index_gamification_plugin_points_categorizations_on_profile_id" | ||
467 | + | ||
468 | + create_table "gamification_plugin_points_types", :force => true do |t| | ||
469 | + t.string "name" | ||
470 | + t.text "description" | ||
471 | + t.datetime "created_at", :null => false | ||
472 | + t.datetime "updated_at", :null => false | ||
473 | + end | ||
474 | + | ||
430 | create_table "images", :force => true do |t| | 475 | create_table "images", :force => true do |t| |
431 | t.integer "parent_id" | 476 | t.integer "parent_id" |
432 | - t.string "content_type" | ||
433 | - t.string "filename" | ||
434 | - t.string "thumbnail" | 477 | + t.string "content_type", :limit => nil |
478 | + t.string "filename", :limit => nil | ||
479 | + t.string "thumbnail", :limit => nil | ||
435 | t.integer "size" | 480 | t.integer "size" |
436 | t.integer "width" | 481 | t.integer "width" |
437 | t.integer "height" | 482 | t.integer "height" |
438 | - t.boolean "thumbnails_processed", :default => false | ||
439 | - t.string "label", :default => "" | 483 | + t.boolean "thumbnails_processed", :default => false |
484 | + t.string "label", :limit => nil, :default => "" | ||
440 | end | 485 | end |
441 | 486 | ||
442 | add_index "images", ["parent_id"], :name => "index_images_on_parent_id" | 487 | add_index "images", ["parent_id"], :name => "index_images_on_parent_id" |
@@ -458,10 +503,10 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -458,10 +503,10 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
458 | add_index "inputs", ["product_id"], :name => "index_inputs_on_product_id" | 503 | add_index "inputs", ["product_id"], :name => "index_inputs_on_product_id" |
459 | 504 | ||
460 | create_table "licenses", :force => true do |t| | 505 | create_table "licenses", :force => true do |t| |
461 | - t.string "name", :null => false | ||
462 | - t.string "slug", :null => false | ||
463 | - t.string "url" | ||
464 | - t.integer "environment_id", :null => false | 506 | + t.string "name", :limit => nil, :null => false |
507 | + t.string "slug", :limit => nil, :null => false | ||
508 | + t.string "url", :limit => nil | ||
509 | + t.integer "environment_id", :null => false | ||
465 | end | 510 | end |
466 | 511 | ||
467 | create_table "mailing_sents", :force => true do |t| | 512 | create_table "mailing_sents", :force => true do |t| |
@@ -472,24 +517,17 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -472,24 +517,17 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
472 | end | 517 | end |
473 | 518 | ||
474 | create_table "mailings", :force => true do |t| | 519 | create_table "mailings", :force => true do |t| |
475 | - t.string "type" | ||
476 | - t.string "subject" | 520 | + t.string "type", :limit => nil |
521 | + t.string "subject", :limit => nil | ||
477 | t.text "body" | 522 | t.text "body" |
478 | t.integer "source_id" | 523 | t.integer "source_id" |
479 | - t.string "source_type" | 524 | + t.string "source_type", :limit => nil |
480 | t.integer "person_id" | 525 | t.integer "person_id" |
481 | - t.string "locale" | 526 | + t.string "locale", :limit => nil |
482 | t.datetime "created_at" | 527 | t.datetime "created_at" |
483 | t.datetime "updated_at" | 528 | t.datetime "updated_at" |
484 | end | 529 | end |
485 | 530 | ||
486 | - create_table "mark_comment_as_read_plugin", :force => true do |t| | ||
487 | - t.integer "comment_id" | ||
488 | - t.integer "person_id" | ||
489 | - end | ||
490 | - | ||
491 | - add_index "mark_comment_as_read_plugin", ["comment_id", "person_id"], :name => "index_mark_comment_as_read_plugin_on_comment_id_and_person_id", :unique => true | ||
492 | - | ||
493 | create_table "merit_actions", :force => true do |t| | 531 | create_table "merit_actions", :force => true do |t| |
494 | t.integer "user_id" | 532 | t.integer "user_id" |
495 | t.string "action_method" | 533 | t.string "action_method" |
@@ -525,13 +563,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -525,13 +563,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
525 | end | 563 | end |
526 | 564 | ||
527 | create_table "national_region_types", :force => true do |t| | 565 | create_table "national_region_types", :force => true do |t| |
528 | - t.string "name" | 566 | + t.string "name", :limit => nil |
529 | end | 567 | end |
530 | 568 | ||
531 | create_table "national_regions", :force => true do |t| | 569 | create_table "national_regions", :force => true do |t| |
532 | - t.string "name" | ||
533 | - t.string "national_region_code" | ||
534 | - t.string "parent_national_region_code" | 570 | + t.string "name", :limit => nil |
571 | + t.string "national_region_code", :limit => nil | ||
572 | + t.string "parent_national_region_code", :limit => nil | ||
535 | t.datetime "created_at" | 573 | t.datetime "created_at" |
536 | t.datetime "updated_at" | 574 | t.datetime "updated_at" |
537 | t.integer "national_region_type_id" | 575 | t.integer "national_region_type_id" |
@@ -540,15 +578,6 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -540,15 +578,6 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
540 | add_index "national_regions", ["name"], :name => "name_index" | 578 | add_index "national_regions", ["name"], :name => "name_index" |
541 | add_index "national_regions", ["national_region_code"], :name => "code_index" | 579 | add_index "national_regions", ["national_region_code"], :name => "code_index" |
542 | 580 | ||
543 | - create_table "pairwise_plugin_choices_related", :force => true do |t| | ||
544 | - t.integer "choice_id" | ||
545 | - t.integer "parent_choice_id" | ||
546 | - t.integer "question_id" | ||
547 | - t.integer "user_id" | ||
548 | - t.datetime "created_at", :null => false | ||
549 | - t.datetime "updated_at", :null => false | ||
550 | - end | ||
551 | - | ||
552 | create_table "price_details", :force => true do |t| | 581 | create_table "price_details", :force => true do |t| |
553 | t.decimal "price", :default => 0.0 | 582 | t.decimal "price", :default => 0.0 |
554 | t.integer "product_id" | 583 | t.integer "product_id" |
@@ -570,9 +599,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -570,9 +599,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
570 | add_index "product_qualifiers", ["qualifier_id"], :name => "index_product_qualifiers_on_qualifier_id" | 599 | add_index "product_qualifiers", ["qualifier_id"], :name => "index_product_qualifiers_on_qualifier_id" |
571 | 600 | ||
572 | create_table "production_costs", :force => true do |t| | 601 | create_table "production_costs", :force => true do |t| |
573 | - t.string "name" | 602 | + t.string "name", :limit => nil |
574 | t.integer "owner_id" | 603 | t.integer "owner_id" |
575 | - t.string "owner_type" | 604 | + t.string "owner_type", :limit => nil |
576 | t.datetime "created_at" | 605 | t.datetime "created_at" |
577 | t.datetime "updated_at" | 606 | t.datetime "updated_at" |
578 | end | 607 | end |
@@ -580,19 +609,19 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -580,19 +609,19 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
580 | create_table "products", :force => true do |t| | 609 | create_table "products", :force => true do |t| |
581 | t.integer "profile_id" | 610 | t.integer "profile_id" |
582 | t.integer "product_category_id" | 611 | t.integer "product_category_id" |
583 | - t.string "name" | 612 | + t.string "name", :limit => nil |
584 | t.decimal "price" | 613 | t.decimal "price" |
585 | t.text "description" | 614 | t.text "description" |
586 | t.datetime "created_at" | 615 | t.datetime "created_at" |
587 | t.datetime "updated_at" | 616 | t.datetime "updated_at" |
588 | t.decimal "discount" | 617 | t.decimal "discount" |
589 | - t.boolean "available", :default => true | ||
590 | - t.boolean "highlighted", :default => false | 618 | + t.boolean "available", :default => true |
619 | + t.boolean "highlighted", :default => false | ||
591 | t.integer "unit_id" | 620 | t.integer "unit_id" |
592 | t.integer "image_id" | 621 | t.integer "image_id" |
593 | - t.string "type" | 622 | + t.string "type", :limit => nil |
594 | t.text "data" | 623 | t.text "data" |
595 | - t.boolean "archived", :default => false | 624 | + t.boolean "archived", :default => false |
596 | end | 625 | end |
597 | 626 | ||
598 | add_index "products", ["created_at"], :name => "index_products_on_created_at" | 627 | add_index "products", ["created_at"], :name => "index_products_on_created_at" |
@@ -602,9 +631,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -602,9 +631,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
602 | create_table "profile_activities", :force => true do |t| | 631 | create_table "profile_activities", :force => true do |t| |
603 | t.integer "profile_id" | 632 | t.integer "profile_id" |
604 | t.integer "activity_id" | 633 | t.integer "activity_id" |
605 | - t.string "activity_type" | ||
606 | - t.datetime "created_at", :null => false | ||
607 | - t.datetime "updated_at", :null => false | 634 | + t.string "activity_type", :limit => nil |
635 | + t.datetime "created_at", :null => false | ||
636 | + t.datetime "updated_at", :null => false | ||
608 | end | 637 | end |
609 | 638 | ||
610 | add_index "profile_activities", ["activity_id", "activity_type"], :name => "index_profile_activities_on_activity_id_and_activity_type" | 639 | add_index "profile_activities", ["activity_id", "activity_type"], :name => "index_profile_activities_on_activity_id_and_activity_type" |
@@ -614,12 +643,12 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -614,12 +643,12 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
614 | create_table "profile_suggestions", :force => true do |t| | 643 | create_table "profile_suggestions", :force => true do |t| |
615 | t.integer "person_id" | 644 | t.integer "person_id" |
616 | t.integer "suggestion_id" | 645 | t.integer "suggestion_id" |
617 | - t.string "suggestion_type" | 646 | + t.string "suggestion_type", :limit => nil |
618 | t.text "categories" | 647 | t.text "categories" |
619 | - t.boolean "enabled", :default => true | ||
620 | - t.float "score", :default => 0.0 | ||
621 | - t.datetime "created_at", :null => false | ||
622 | - t.datetime "updated_at", :null => false | 648 | + t.boolean "enabled", :default => true |
649 | + t.float "score", :default => 0.0 | ||
650 | + t.datetime "created_at", :null => false | ||
651 | + t.datetime "updated_at", :null => false | ||
623 | end | 652 | end |
624 | 653 | ||
625 | add_index "profile_suggestions", ["person_id"], :name => "index_profile_suggestions_on_person_id" | 654 | add_index "profile_suggestions", ["person_id"], :name => "index_profile_suggestions_on_person_id" |
@@ -627,13 +656,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -627,13 +656,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
627 | add_index "profile_suggestions", ["suggestion_id"], :name => "index_profile_suggestions_on_suggestion_id" | 656 | add_index "profile_suggestions", ["suggestion_id"], :name => "index_profile_suggestions_on_suggestion_id" |
628 | 657 | ||
629 | create_table "profiles", :force => true do |t| | 658 | create_table "profiles", :force => true do |t| |
630 | - t.string "name" | ||
631 | - t.string "type" | ||
632 | - t.string "identifier" | 659 | + t.string "name", :limit => nil |
660 | + t.string "type", :limit => nil | ||
661 | + t.string "identifier", :limit => nil | ||
633 | t.integer "environment_id" | 662 | t.integer "environment_id" |
634 | - t.boolean "active", :default => true | ||
635 | - t.string "address" | ||
636 | - t.string "contact_phone" | 663 | + t.boolean "active", :default => true |
664 | + t.string "address", :limit => nil | ||
665 | + t.string "contact_phone", :limit => nil | ||
637 | t.integer "home_page_id" | 666 | t.integer "home_page_id" |
638 | t.integer "user_id" | 667 | t.integer "user_id" |
639 | t.integer "region_id" | 668 | t.integer "region_id" |
@@ -642,49 +671,45 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -642,49 +671,45 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
642 | t.float "lat" | 671 | t.float "lat" |
643 | t.float "lng" | 672 | t.float "lng" |
644 | t.integer "geocode_precision" | 673 | t.integer "geocode_precision" |
645 | - t.boolean "enabled", :default => true | 674 | + t.boolean "enabled", :default => true |
646 | t.string "nickname", :limit => 16 | 675 | t.string "nickname", :limit => 16 |
647 | t.text "custom_header" | 676 | t.text "custom_header" |
648 | t.text "custom_footer" | 677 | t.text "custom_footer" |
649 | - t.string "theme" | ||
650 | - t.boolean "public_profile", :default => true | 678 | + t.string "theme", :limit => nil |
679 | + t.boolean "public_profile", :default => true | ||
651 | t.date "birth_date" | 680 | t.date "birth_date" |
652 | t.integer "preferred_domain_id" | 681 | t.integer "preferred_domain_id" |
653 | t.datetime "updated_at" | 682 | t.datetime "updated_at" |
654 | - t.boolean "visible", :default => true | 683 | + t.boolean "visible", :default => true |
655 | t.integer "image_id" | 684 | t.integer "image_id" |
656 | - t.boolean "validated", :default => true | ||
657 | - t.string "cnpj" | ||
658 | - t.string "national_region_code" | ||
659 | - t.boolean "is_template", :default => false | 685 | + t.boolean "validated", :default => true |
686 | + t.string "cnpj", :limit => nil | ||
687 | + t.string "national_region_code", :limit => nil | ||
688 | + t.boolean "is_template", :default => false | ||
660 | t.integer "template_id" | 689 | t.integer "template_id" |
661 | - t.string "redirection_after_login" | ||
662 | - t.integer "friends_count", :default => 0, :null => false | ||
663 | - t.integer "members_count", :default => 0, :null => false | ||
664 | - t.integer "activities_count", :default => 0, :null => false | ||
665 | - t.string "personal_website" | ||
666 | - t.string "jabber_id" | 690 | + t.string "redirection_after_login", :limit => nil |
691 | + t.integer "friends_count", :default => 0, :null => false | ||
692 | + t.integer "members_count", :default => 0, :null => false | ||
693 | + t.integer "activities_count", :default => 0, :null => false | ||
694 | + t.string "personal_website", :limit => nil | ||
695 | + t.string "jabber_id", :limit => nil | ||
667 | t.integer "welcome_page_id" | 696 | t.integer "welcome_page_id" |
668 | - t.boolean "allow_members_to_invite", :default => true | ||
669 | - t.boolean "invite_friends_only", :default => false | ||
670 | - t.boolean "secret", :default => false | 697 | + t.boolean "allow_members_to_invite", :default => true |
698 | + t.boolean "invite_friends_only", :default => false | ||
699 | + t.boolean "secret", :default => false | ||
671 | t.integer "sash_id" | 700 | t.integer "sash_id" |
672 | - t.integer "level", :default => 0 | 701 | + t.integer "level", :default => 0 |
673 | end | 702 | end |
674 | 703 | ||
675 | add_index "profiles", ["activities_count"], :name => "index_profiles_on_activities_count" | 704 | add_index "profiles", ["activities_count"], :name => "index_profiles_on_activities_count" |
676 | add_index "profiles", ["created_at"], :name => "index_profiles_on_created_at" | 705 | add_index "profiles", ["created_at"], :name => "index_profiles_on_created_at" |
677 | - add_index "profiles", ["enabled"], :name => "index_profiles_on_enabled" | ||
678 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | 706 | add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" |
679 | add_index "profiles", ["friends_count"], :name => "index_profiles_on_friends_count" | 707 | add_index "profiles", ["friends_count"], :name => "index_profiles_on_friends_count" |
680 | add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" | 708 | add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier" |
681 | add_index "profiles", ["members_count"], :name => "index_profiles_on_members_count" | 709 | add_index "profiles", ["members_count"], :name => "index_profiles_on_members_count" |
682 | add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id" | 710 | add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id" |
683 | - add_index "profiles", ["type"], :name => "index_profiles_on_type" | ||
684 | add_index "profiles", ["user_id", "type"], :name => "index_profiles_on_user_id_and_type" | 711 | add_index "profiles", ["user_id", "type"], :name => "index_profiles_on_user_id_and_type" |
685 | add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id" | 712 | add_index "profiles", ["user_id"], :name => "index_profiles_on_user_id" |
686 | - add_index "profiles", ["validated"], :name => "index_profiles_on_validated" | ||
687 | - add_index "profiles", ["visible"], :name => "index_profiles_on_visible" | ||
688 | 713 | ||
689 | create_table "proposals_discussion_plugin_proposal_evaluations", :force => true do |t| | 714 | create_table "proposals_discussion_plugin_proposal_evaluations", :force => true do |t| |
690 | t.integer "proposal_task_id" | 715 | t.integer "proposal_task_id" |
@@ -722,7 +747,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -722,7 +747,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
722 | end | 747 | end |
723 | 748 | ||
724 | create_table "qualifiers", :force => true do |t| | 749 | create_table "qualifiers", :force => true do |t| |
725 | - t.string "name", :null => false | 750 | + t.string "name", :limit => nil, :null => false |
726 | t.integer "environment_id" | 751 | t.integer "environment_id" |
727 | t.datetime "created_at" | 752 | t.datetime "created_at" |
728 | t.datetime "updated_at" | 753 | t.datetime "updated_at" |
@@ -740,32 +765,26 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -740,32 +765,26 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
740 | 765 | ||
741 | create_table "reported_images", :force => true do |t| | 766 | create_table "reported_images", :force => true do |t| |
742 | t.integer "size" | 767 | t.integer "size" |
743 | - t.string "content_type" | ||
744 | - t.string "filename" | 768 | + t.string "content_type", :limit => nil |
769 | + t.string "filename", :limit => nil | ||
745 | t.integer "height" | 770 | t.integer "height" |
746 | t.integer "width" | 771 | t.integer "width" |
747 | t.integer "abuse_report_id" | 772 | t.integer "abuse_report_id" |
748 | end | 773 | end |
749 | 774 | ||
750 | create_table "role_assignments", :force => true do |t| | 775 | create_table "role_assignments", :force => true do |t| |
751 | - t.integer "accessor_id", :null => false | ||
752 | - t.string "accessor_type" | 776 | + t.integer "accessor_id", :null => false |
777 | + t.string "accessor_type", :limit => nil | ||
753 | t.integer "resource_id" | 778 | t.integer "resource_id" |
754 | - t.string "resource_type" | ||
755 | - t.integer "role_id", :null => false | 779 | + t.string "resource_type", :limit => nil |
780 | + t.integer "role_id", :null => false | ||
756 | t.boolean "is_global" | 781 | t.boolean "is_global" |
757 | end | 782 | end |
758 | 783 | ||
759 | - add_index "role_assignments", ["accessor_id", "accessor_type", "resource_id", "resource_type"], :name => "index_on_role_assigments_accessor_resource_role" | ||
760 | - add_index "role_assignments", ["accessor_id", "accessor_type", "role_id"], :name => "index_on_role_assigments_accessor_role" | ||
761 | - add_index "role_assignments", ["accessor_id", "accessor_type"], :name => "index_role_assignments_on_accessor_id_and_accessor_type" | ||
762 | - add_index "role_assignments", ["resource_id", "resource_type", "role_id"], :name => "index_on_role_assigments_resource_role" | ||
763 | - add_index "role_assignments", ["resource_id", "resource_type"], :name => "index_role_assignments_on_resource_id_and_resource_type" | ||
764 | - | ||
765 | create_table "roles", :force => true do |t| | 784 | create_table "roles", :force => true do |t| |
766 | - t.string "name" | ||
767 | - t.string "key" | ||
768 | - t.boolean "system", :default => false | 785 | + t.string "name", :limit => nil |
786 | + t.string "key", :limit => nil | ||
787 | + t.boolean "system", :default => false | ||
769 | t.text "permissions" | 788 | t.text "permissions" |
770 | t.integer "environment_id" | 789 | t.integer "environment_id" |
771 | t.integer "profile_id" | 790 | t.integer "profile_id" |
@@ -796,13 +815,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -796,13 +815,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
796 | add_index "search_term_occurrences", ["created_at"], :name => "index_search_term_occurrences_on_created_at" | 815 | add_index "search_term_occurrences", ["created_at"], :name => "index_search_term_occurrences_on_created_at" |
797 | 816 | ||
798 | create_table "search_terms", :force => true do |t| | 817 | create_table "search_terms", :force => true do |t| |
799 | - t.string "term" | 818 | + t.string "term", :limit => nil |
800 | t.integer "context_id" | 819 | t.integer "context_id" |
801 | - t.string "context_type" | ||
802 | - t.string "asset", :default => "all" | ||
803 | - t.float "score", :default => 0.0 | ||
804 | - t.float "relevance_score", :default => 0.0 | ||
805 | - t.float "occurrence_score", :default => 0.0 | 820 | + t.string "context_type", :limit => nil |
821 | + t.string "asset", :limit => nil, :default => "all" | ||
822 | + t.float "score", :default => 0.0 | ||
823 | + t.float "relevance_score", :default => 0.0 | ||
824 | + t.float "occurrence_score", :default => 0.0 | ||
806 | end | 825 | end |
807 | 826 | ||
808 | add_index "search_terms", ["asset"], :name => "index_search_terms_on_asset" | 827 | add_index "search_terms", ["asset"], :name => "index_search_terms_on_asset" |
@@ -812,7 +831,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -812,7 +831,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
812 | add_index "search_terms", ["term"], :name => "index_search_terms_on_term" | 831 | add_index "search_terms", ["term"], :name => "index_search_terms_on_term" |
813 | 832 | ||
814 | create_table "sessions", :force => true do |t| | 833 | create_table "sessions", :force => true do |t| |
815 | - t.string "session_id", :null => false | 834 | + t.string "session_id", :limit => nil, :null => false |
816 | t.text "data" | 835 | t.text "data" |
817 | t.datetime "created_at" | 836 | t.datetime "created_at" |
818 | t.datetime "updated_at" | 837 | t.datetime "updated_at" |
@@ -824,18 +843,18 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -824,18 +843,18 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
824 | add_index "sessions", ["user_id"], :name => "index_sessions_on_user_id" | 843 | add_index "sessions", ["user_id"], :name => "index_sessions_on_user_id" |
825 | 844 | ||
826 | create_table "suggestion_connections", :force => true do |t| | 845 | create_table "suggestion_connections", :force => true do |t| |
827 | - t.integer "suggestion_id", :null => false | ||
828 | - t.integer "connection_id", :null => false | ||
829 | - t.string "connection_type", :null => false | 846 | + t.integer "suggestion_id", :null => false |
847 | + t.integer "connection_id", :null => false | ||
848 | + t.string "connection_type", :limit => nil, :null => false | ||
830 | end | 849 | end |
831 | 850 | ||
832 | create_table "taggings", :force => true do |t| | 851 | create_table "taggings", :force => true do |t| |
833 | t.integer "tag_id" | 852 | t.integer "tag_id" |
834 | t.integer "taggable_id" | 853 | t.integer "taggable_id" |
835 | - t.string "taggable_type" | 854 | + t.string "taggable_type", :limit => nil |
836 | t.datetime "created_at" | 855 | t.datetime "created_at" |
837 | t.integer "tagger_id" | 856 | t.integer "tagger_id" |
838 | - t.string "tagger_type" | 857 | + t.string "tagger_type", :limit => nil |
839 | t.string "context", :limit => 128 | 858 | t.string "context", :limit => 128 |
840 | end | 859 | end |
841 | 860 | ||
@@ -844,10 +863,10 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -844,10 +863,10 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
844 | add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" | 863 | add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type" |
845 | 864 | ||
846 | create_table "tags", :force => true do |t| | 865 | create_table "tags", :force => true do |t| |
847 | - t.string "name" | 866 | + t.string "name", :limit => nil |
848 | t.integer "parent_id" | 867 | t.integer "parent_id" |
849 | - t.boolean "pending", :default => false | ||
850 | - t.integer "taggings_count", :default => 0 | 868 | + t.boolean "pending", :default => false |
869 | + t.integer "taggings_count", :default => 0 | ||
851 | end | 870 | end |
852 | 871 | ||
853 | add_index "tags", ["name"], :name => "index_tags_on_name", :unique => true | 872 | add_index "tags", ["name"], :name => "index_tags_on_name", :unique => true |
@@ -860,11 +879,11 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -860,11 +879,11 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
860 | t.integer "requestor_id" | 879 | t.integer "requestor_id" |
861 | t.integer "target_id" | 880 | t.integer "target_id" |
862 | t.string "code", :limit => 40 | 881 | t.string "code", :limit => 40 |
863 | - t.string "type" | 882 | + t.string "type", :limit => nil |
864 | t.datetime "created_at" | 883 | t.datetime "created_at" |
865 | - t.string "target_type" | 884 | + t.string "target_type", :limit => nil |
866 | t.integer "image_id" | 885 | t.integer "image_id" |
867 | - t.boolean "spam", :default => false | 886 | + t.boolean "spam", :default => false |
868 | t.integer "responsible_id" | 887 | t.integer "responsible_id" |
869 | t.integer "closed_by_id" | 888 | t.integer "closed_by_id" |
870 | end | 889 | end |
@@ -885,45 +904,45 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -885,45 +904,45 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
885 | 904 | ||
886 | create_table "thumbnails", :force => true do |t| | 905 | create_table "thumbnails", :force => true do |t| |
887 | t.integer "size" | 906 | t.integer "size" |
888 | - t.string "content_type" | ||
889 | - t.string "filename" | 907 | + t.string "content_type", :limit => nil |
908 | + t.string "filename", :limit => nil | ||
890 | t.integer "height" | 909 | t.integer "height" |
891 | t.integer "width" | 910 | t.integer "width" |
892 | t.integer "parent_id" | 911 | t.integer "parent_id" |
893 | - t.string "thumbnail" | 912 | + t.string "thumbnail", :limit => nil |
894 | end | 913 | end |
895 | 914 | ||
896 | add_index "thumbnails", ["parent_id"], :name => "index_thumbnails_on_parent_id" | 915 | add_index "thumbnails", ["parent_id"], :name => "index_thumbnails_on_parent_id" |
897 | 916 | ||
898 | create_table "units", :force => true do |t| | 917 | create_table "units", :force => true do |t| |
899 | - t.string "singular", :null => false | ||
900 | - t.string "plural", :null => false | 918 | + t.string "singular", :limit => nil, :null => false |
919 | + t.string "plural", :limit => nil, :null => false | ||
901 | t.integer "position" | 920 | t.integer "position" |
902 | - t.integer "environment_id", :null => false | 921 | + t.integer "environment_id", :null => false |
903 | end | 922 | end |
904 | 923 | ||
905 | create_table "users", :force => true do |t| | 924 | create_table "users", :force => true do |t| |
906 | - t.string "login" | ||
907 | - t.string "email" | 925 | + t.string "login", :limit => nil |
926 | + t.string "email", :limit => nil | ||
908 | t.string "crypted_password", :limit => 40 | 927 | t.string "crypted_password", :limit => 40 |
909 | t.string "salt", :limit => 40 | 928 | t.string "salt", :limit => 40 |
910 | t.datetime "created_at" | 929 | t.datetime "created_at" |
911 | t.datetime "updated_at" | 930 | t.datetime "updated_at" |
912 | - t.string "remember_token" | 931 | + t.string "remember_token", :limit => nil |
913 | t.datetime "remember_token_expires_at" | 932 | t.datetime "remember_token_expires_at" |
914 | t.text "terms_of_use" | 933 | t.text "terms_of_use" |
915 | t.string "terms_accepted", :limit => 1 | 934 | t.string "terms_accepted", :limit => 1 |
916 | t.integer "environment_id" | 935 | t.integer "environment_id" |
917 | - t.string "password_type" | ||
918 | - t.boolean "enable_email", :default => false | ||
919 | - t.string "last_chat_status", :default => "" | ||
920 | - t.string "chat_status", :default => "" | 936 | + t.string "password_type", :limit => nil |
937 | + t.boolean "enable_email", :default => false | ||
938 | + t.string "last_chat_status", :limit => nil, :default => "" | ||
939 | + t.string "chat_status", :limit => nil, :default => "" | ||
921 | t.datetime "chat_status_at" | 940 | t.datetime "chat_status_at" |
922 | t.string "activation_code", :limit => 40 | 941 | t.string "activation_code", :limit => 40 |
923 | t.datetime "activated_at" | 942 | t.datetime "activated_at" |
924 | - t.string "return_to" | 943 | + t.string "return_to", :limit => nil |
925 | t.datetime "last_login_at" | 944 | t.datetime "last_login_at" |
926 | - t.string "private_token" | 945 | + t.string "private_token", :limit => nil |
927 | t.datetime "private_token_generated_at" | 946 | t.datetime "private_token_generated_at" |
928 | end | 947 | end |
929 | 948 | ||
@@ -934,11 +953,11 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | @@ -934,11 +953,11 @@ ActiveRecord::Schema.define(:version => 20150918005035) do | ||
934 | end | 953 | end |
935 | 954 | ||
936 | create_table "votes", :force => true do |t| | 955 | create_table "votes", :force => true do |t| |
937 | - t.integer "vote", :null => false | ||
938 | - t.integer "voteable_id", :null => false | ||
939 | - t.string "voteable_type", :null => false | 956 | + t.integer "vote", :null => false |
957 | + t.integer "voteable_id", :null => false | ||
958 | + t.string "voteable_type", :limit => nil, :null => false | ||
940 | t.integer "voter_id" | 959 | t.integer "voter_id" |
941 | - t.string "voter_type" | 960 | + t.string "voter_type", :limit => nil |
942 | t.datetime "created_at" | 961 | t.datetime "created_at" |
943 | t.datetime "updated_at" | 962 | t.datetime "updated_at" |
944 | end | 963 | end |
plugins/dialoga
plugins/email_article
plugins/gamification
plugins/gravatar_provider
plugins/juventude
plugins/pairwise
plugins/proposals_discussion
@@ -0,0 +1,36 @@ | @@ -0,0 +1,36 @@ | ||
1 | +#!/usr/bin/env ruby | ||
2 | +require File.dirname(__FILE__) + '/../config/environment' | ||
3 | +require 'csv' | ||
4 | + | ||
5 | +author = User.find_by_email('3confjuvetapanacional@gmail.com').person | ||
6 | +#discussion = ProposalsDiscussionPlugin::Discussion.first | ||
7 | +topic = nil | ||
8 | + | ||
9 | +count = 0 | ||
10 | +filepath = File.dirname(__FILE__) + '/../tmp/propostas.csv' | ||
11 | +CSV.foreach(filepath, {:col_sep => ';', :force_quotes => true}) do |row| | ||
12 | + count += 1 | ||
13 | + puts row.inspect | ||
14 | + topic_name, proposal_body = row | ||
15 | + next if proposal_body.nil? | ||
16 | + topic_name = topic_name.chomp | ||
17 | + proposal_body = proposal_body.chomp | ||
18 | +#puts topic_name.inspect | ||
19 | +#puts proposal_body.inspect | ||
20 | + topic = ProposalsDiscussionPlugin::Topic.find_by_name(topic_name) if topic.nil? || topic.name != topic_name | ||
21 | + | ||
22 | +#puts topic.inspect | ||
23 | + | ||
24 | + proposal = ProposalsDiscussionPlugin::Proposal.new | ||
25 | + proposal.author = author | ||
26 | + proposal.topic = topic | ||
27 | + proposal.abstract = proposal_body | ||
28 | +# proposal.name = count.to_s + ' - ' + proposal_body[0..36].titleize | ||
29 | + proposal.name = proposal_body[0..36].titleize | ||
30 | + proposal.profile = topic.profile | ||
31 | + proposal.save! | ||
32 | + | ||
33 | +puts proposal.inspect | ||
34 | +end | ||
35 | + | ||
36 | + |