Commit 05915dacc6ae0e81da3c31deca1861463d8a7a5c

Authored by Leandro Santos
1 parent 6f6dfc33
Exists in production

adding load proposal script

Gemfile.lock
... ... @@ -54,7 +54,7 @@ GEM
54 54 rack (>= 1.0.0)
55 55 rack-test (>= 0.5.4)
56 56 xpath (~> 2.0)
57   - childprocess (0.5.6)
  57 + childprocess (0.5.8)
58 58 ffi (~> 1.0, >= 1.0.11)
59 59 chronic (0.10.2)
60 60 coercible (1.0.0)
... ... @@ -107,7 +107,7 @@ GEM
107 107 grape-swagger (0.10.2)
108 108 grape (>= 0.8.0)
109 109 grape-entity
110   - hashie (3.4.2)
  110 + hashie (3.4.3)
111 111 hike (1.2.3)
112 112 i18n (0.7.0)
113 113 ice_nine (0.11.1)
... ... @@ -127,14 +127,14 @@ GEM
127 127 ambry (~> 0.3.0)
128 128 metaclass (0.0.4)
129 129 mime-types (1.25.1)
130   - mini_portile (0.6.2)
  130 + mini_portile2 (2.0.0)
131 131 minitest (3.2.0)
132 132 mocha (1.1.0)
133 133 metaclass (~> 0.0.1)
134 134 multi_json (1.11.2)
135 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 138 pg (0.13.2)
139 139 polyglot (0.3.5)
140 140 rack (1.4.7)
... ...
db/schema.rb
... ... @@ -11,7 +11,7 @@
11 11 #
12 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 16 create_table "abuse_reports", :force => true do |t|
17 17 t.integer "reporter_id"
... ... @@ -24,15 +24,15 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
24 24  
25 25 create_table "action_tracker", :force => true do |t|
26 26 t.integer "user_id"
27   - t.string "user_type"
  27 + t.string "user_type", :limit => nil
28 28 t.integer "target_id"
29   - t.string "target_type"
  29 + t.string "target_type", :limit => nil
30 30 t.text "params"
31   - t.string "verb"
  31 + t.string "verb", :limit => nil
32 32 t.datetime "created_at"
33 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 36 end
37 37  
38 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 52 t.integer "person_id", :null => false
53 53 t.integer "article_id", :null => false
54 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 57 end
58 58  
59 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 68 create_table "article_versions", :force => true do |t|
69 69 t.integer "article_id"
70 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 74 t.integer "parent_id"
75 75 t.text "body"
76 76 t.text "abstract"
... ... @@ -79,35 +79,35 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
79 79 t.datetime "created_at"
80 80 t.integer "last_changed_by_id"
81 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 84 t.integer "height"
85 85 t.integer "width"
86   - t.string "versioned_type"
  86 + t.string "versioned_type", :limit => nil
87 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 90 t.datetime "start_date"
91 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 94 t.integer "reference_article_id"
95 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 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 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 107 t.integer "license_id"
108 108 t.integer "image_id"
109 109 t.integer "position"
110   - t.integer "spam_comments_count", :default => 0
  110 + t.integer "spam_comments_count", :default => 0
111 111 t.integer "author_id"
112 112 t.integer "created_by_id"
113 113 t.integer "followers_count"
... ... @@ -120,9 +120,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
120 120 add_index "article_versions", ["published_at", "id"], :name => "index_article_versions_on_published_at_and_id"
121 121  
122 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 126 t.integer "parent_id"
127 127 t.text "body"
128 128 t.text "abstract"
... ... @@ -131,42 +131,42 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
131 131 t.datetime "created_at"
132 132 t.integer "last_changed_by_id"
133 133 t.integer "version"
134   - t.string "type"
  134 + t.string "type", :limit => nil
135 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 138 t.integer "height"
139 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 143 t.datetime "start_date"
144 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 147 t.integer "reference_article_id"
148 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 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 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 160 t.integer "license_id"
161 161 t.integer "image_id"
162 162 t.integer "position"
163   - t.integer "spam_comments_count", :default => 0
  163 + t.integer "spam_comments_count", :default => 0
164 164 t.integer "author_id"
165 165 t.integer "created_by_id"
166   - t.boolean "show_to_followers", :default => true
  166 + t.boolean "show_to_followers", :default => true
167 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 170 end
171 171  
172 172 add_index "articles", ["comments_count"], :name => "index_articles_on_comments_count"
... ... @@ -205,16 +205,16 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
205 205 add_index "badges_sashes", ["sash_id"], :name => "index_badges_sashes_on_sash_id"
206 206  
207 207 create_table "blocks", :force => true do |t|
208   - t.string "title"
  208 + t.string "title", :limit => nil
209 209 t.integer "box_id"
210   - t.string "type"
  210 + t.string "type", :limit => nil
211 211 t.text "settings"
212 212 t.integer "position"
213   - t.boolean "enabled", :default => true
  213 + t.boolean "enabled", :default => true
214 214 t.datetime "created_at"
215 215 t.datetime "updated_at"
216 216 t.datetime "fetched_at"
217   - t.boolean "mirror", :default => false
  217 + t.boolean "mirror", :default => false
218 218 t.integer "mirror_block_id"
219 219 t.integer "observers_id"
220 220 end
... ... @@ -225,7 +225,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
225 225 add_index "blocks", ["type"], :name => "index_blocks_on_type"
226 226  
227 227 create_table "boxes", :force => true do |t|
228   - t.string "owner_type"
  228 + t.string "owner_type", :limit => nil
229 229 t.integer "owner_id"
230 230 t.integer "position"
231 231 end
... ... @@ -233,20 +233,20 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
233 233 add_index "boxes", ["owner_id", "owner_type"], :name => "index_boxes_on_owner_type_and_owner_id"
234 234  
235 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 239 t.integer "environment_id"
240 240 t.integer "parent_id"
241   - t.string "type"
  241 + t.string "type", :limit => nil
242 242 t.float "lat"
243 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 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 250 t.string "display_color", :limit => 6
251 251 t.text "ancestry"
252 252 end
... ... @@ -263,9 +263,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
263 263 add_index "categories_profiles", ["profile_id"], :name => "index_categories_profiles_on_profile_id"
264 264  
265 265 create_table "certifiers", :force => true do |t|
266   - t.string "name", :null => false
  266 + t.string "name", :limit => nil, :null => false
267 267 t.text "description"
268   - t.string "link"
  268 + t.string "link", :limit => nil
269 269 t.integer "environment_id"
270 270 t.datetime "created_at"
271 271 t.datetime "updated_at"
... ... @@ -284,22 +284,22 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
284 284 add_index "chat_messages", ["to_id"], :name => "index_chat_messages_on_to_id"
285 285  
286 286 create_table "comments", :force => true do |t|
287   - t.string "title"
  287 + t.string "title", :limit => nil
288 288 t.text "body"
289 289 t.integer "source_id"
290 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 293 t.datetime "created_at"
294 294 t.integer "reply_of_id"
295   - t.string "ip_address"
  295 + t.string "ip_address", :limit => nil
296 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 300 t.text "settings"
301 301 t.integer "paragraph_id"
302   - t.string "paragraph_uuid"
  302 + t.string "paragraph_uuid", :limit => nil
303 303 end
304 304  
305 305 add_index "comments", ["paragraph_uuid"], :name => "index_comments_on_paragraph_uuid"
... ... @@ -307,34 +307,62 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
307 307  
308 308 create_table "contact_lists", :force => true do |t|
309 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 322 t.datetime "created_at"
313 323 t.datetime "updated_at"
314 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 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 347 t.text "handler"
320 348 t.text "last_error"
321 349 t.datetime "run_at"
322 350 t.datetime "locked_at"
323 351 t.datetime "failed_at"
324   - t.string "locked_by"
  352 + t.string "locked_by", :limit => nil
325 353 t.datetime "created_at"
326 354 t.datetime "updated_at"
327   - t.string "queue"
  355 + t.string "queue", :limit => nil
328 356 end
329 357  
330 358 add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
331 359  
332 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 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 366 end
339 367  
340 368 add_index "domains", ["is_default"], :name => "index_domains_on_is_default"
... ... @@ -354,39 +382,38 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
354 382 end
355 383  
356 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 387 t.boolean "is_default"
360 388 t.text "settings"
361 389 t.text "design_data"
362 390 t.text "custom_header"
363 391 t.text "custom_footer"
364   - t.string "theme", :default => "default", :null => false
  392 + t.string "theme", :limit => nil, :default => "default", :null => false
365 393 t.text "terms_of_use_acceptance_text"
366 394 t.datetime "created_at"
367 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 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 404 end
378 405  
379 406 create_table "external_feeds", :force => true do |t|
380   - t.string "feed_title"
  407 + t.string "feed_title", :limit => nil
381 408 t.datetime "fetched_at"
382 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 413 t.datetime "created_at"
387 414 t.datetime "updated_at"
388 415 t.text "error_message"
389   - t.integer "update_errors", :default => 0
  416 + t.integer "update_errors", :default => 0
390 417 end
391 418  
392 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 435 t.integer "person_id"
409 436 t.integer "friend_id"
410 437 t.datetime "created_at"
411   - t.string "group"
  438 + t.string "group", :limit => nil
412 439 end
413 440  
414 441 add_index "friendships", ["friend_id"], :name => "index_friendships_on_friend_id"
... ... @@ -419,7 +446,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
419 446 t.string "name"
420 447 t.integer "level"
421 448 t.string "description"
422   - t.string "custom_fields"
  449 + t.text "custom_fields"
423 450 t.integer "owner_id"
424 451 t.string "owner_type"
425 452 t.datetime "created_at", :null => false
... ... @@ -427,16 +454,34 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
427 454 t.string "title"
428 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 475 create_table "images", :force => true do |t|
431 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 480 t.integer "size"
436 481 t.integer "width"
437 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 485 end
441 486  
442 487 add_index "images", ["parent_id"], :name => "index_images_on_parent_id"
... ... @@ -458,10 +503,10 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
458 503 add_index "inputs", ["product_id"], :name => "index_inputs_on_product_id"
459 504  
460 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 510 end
466 511  
467 512 create_table "mailing_sents", :force => true do |t|
... ... @@ -472,24 +517,17 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
472 517 end
473 518  
474 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 522 t.text "body"
478 523 t.integer "source_id"
479   - t.string "source_type"
  524 + t.string "source_type", :limit => nil
480 525 t.integer "person_id"
481   - t.string "locale"
  526 + t.string "locale", :limit => nil
482 527 t.datetime "created_at"
483 528 t.datetime "updated_at"
484 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 531 create_table "merit_actions", :force => true do |t|
494 532 t.integer "user_id"
495 533 t.string "action_method"
... ... @@ -525,13 +563,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
525 563 end
526 564  
527 565 create_table "national_region_types", :force => true do |t|
528   - t.string "name"
  566 + t.string "name", :limit => nil
529 567 end
530 568  
531 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 573 t.datetime "created_at"
536 574 t.datetime "updated_at"
537 575 t.integer "national_region_type_id"
... ... @@ -540,15 +578,6 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
540 578 add_index "national_regions", ["name"], :name => "name_index"
541 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 581 create_table "price_details", :force => true do |t|
553 582 t.decimal "price", :default => 0.0
554 583 t.integer "product_id"
... ... @@ -570,9 +599,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
570 599 add_index "product_qualifiers", ["qualifier_id"], :name => "index_product_qualifiers_on_qualifier_id"
571 600  
572 601 create_table "production_costs", :force => true do |t|
573   - t.string "name"
  602 + t.string "name", :limit => nil
574 603 t.integer "owner_id"
575   - t.string "owner_type"
  604 + t.string "owner_type", :limit => nil
576 605 t.datetime "created_at"
577 606 t.datetime "updated_at"
578 607 end
... ... @@ -580,19 +609,19 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
580 609 create_table "products", :force => true do |t|
581 610 t.integer "profile_id"
582 611 t.integer "product_category_id"
583   - t.string "name"
  612 + t.string "name", :limit => nil
584 613 t.decimal "price"
585 614 t.text "description"
586 615 t.datetime "created_at"
587 616 t.datetime "updated_at"
588 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 620 t.integer "unit_id"
592 621 t.integer "image_id"
593   - t.string "type"
  622 + t.string "type", :limit => nil
594 623 t.text "data"
595   - t.boolean "archived", :default => false
  624 + t.boolean "archived", :default => false
596 625 end
597 626  
598 627 add_index "products", ["created_at"], :name => "index_products_on_created_at"
... ... @@ -602,9 +631,9 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
602 631 create_table "profile_activities", :force => true do |t|
603 632 t.integer "profile_id"
604 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 637 end
609 638  
610 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 643 create_table "profile_suggestions", :force => true do |t|
615 644 t.integer "person_id"
616 645 t.integer "suggestion_id"
617   - t.string "suggestion_type"
  646 + t.string "suggestion_type", :limit => nil
618 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 652 end
624 653  
625 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 656 add_index "profile_suggestions", ["suggestion_id"], :name => "index_profile_suggestions_on_suggestion_id"
628 657  
629 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 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 666 t.integer "home_page_id"
638 667 t.integer "user_id"
639 668 t.integer "region_id"
... ... @@ -642,49 +671,45 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
642 671 t.float "lat"
643 672 t.float "lng"
644 673 t.integer "geocode_precision"
645   - t.boolean "enabled", :default => true
  674 + t.boolean "enabled", :default => true
646 675 t.string "nickname", :limit => 16
647 676 t.text "custom_header"
648 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 680 t.date "birth_date"
652 681 t.integer "preferred_domain_id"
653 682 t.datetime "updated_at"
654   - t.boolean "visible", :default => true
  683 + t.boolean "visible", :default => true
655 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 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 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 700 t.integer "sash_id"
672   - t.integer "level", :default => 0
  701 + t.integer "level", :default => 0
673 702 end
674 703  
675 704 add_index "profiles", ["activities_count"], :name => "index_profiles_on_activities_count"
676 705 add_index "profiles", ["created_at"], :name => "index_profiles_on_created_at"
677   - add_index "profiles", ["enabled"], :name => "index_profiles_on_enabled"
678 706 add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id"
679 707 add_index "profiles", ["friends_count"], :name => "index_profiles_on_friends_count"
680 708 add_index "profiles", ["identifier"], :name => "index_profiles_on_identifier"
681 709 add_index "profiles", ["members_count"], :name => "index_profiles_on_members_count"
682 710 add_index "profiles", ["region_id"], :name => "index_profiles_on_region_id"
683   - add_index "profiles", ["type"], :name => "index_profiles_on_type"
684 711 add_index "profiles", ["user_id", "type"], :name => "index_profiles_on_user_id_and_type"
685 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 714 create_table "proposals_discussion_plugin_proposal_evaluations", :force => true do |t|
690 715 t.integer "proposal_task_id"
... ... @@ -722,7 +747,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
722 747 end
723 748  
724 749 create_table "qualifiers", :force => true do |t|
725   - t.string "name", :null => false
  750 + t.string "name", :limit => nil, :null => false
726 751 t.integer "environment_id"
727 752 t.datetime "created_at"
728 753 t.datetime "updated_at"
... ... @@ -740,32 +765,26 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
740 765  
741 766 create_table "reported_images", :force => true do |t|
742 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 770 t.integer "height"
746 771 t.integer "width"
747 772 t.integer "abuse_report_id"
748 773 end
749 774  
750 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 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 781 t.boolean "is_global"
757 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 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 788 t.text "permissions"
770 789 t.integer "environment_id"
771 790 t.integer "profile_id"
... ... @@ -796,13 +815,13 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
796 815 add_index "search_term_occurrences", ["created_at"], :name => "index_search_term_occurrences_on_created_at"
797 816  
798 817 create_table "search_terms", :force => true do |t|
799   - t.string "term"
  818 + t.string "term", :limit => nil
800 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 825 end
807 826  
808 827 add_index "search_terms", ["asset"], :name => "index_search_terms_on_asset"
... ... @@ -812,7 +831,7 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
812 831 add_index "search_terms", ["term"], :name => "index_search_terms_on_term"
813 832  
814 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 835 t.text "data"
817 836 t.datetime "created_at"
818 837 t.datetime "updated_at"
... ... @@ -824,18 +843,18 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
824 843 add_index "sessions", ["user_id"], :name => "index_sessions_on_user_id"
825 844  
826 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 849 end
831 850  
832 851 create_table "taggings", :force => true do |t|
833 852 t.integer "tag_id"
834 853 t.integer "taggable_id"
835   - t.string "taggable_type"
  854 + t.string "taggable_type", :limit => nil
836 855 t.datetime "created_at"
837 856 t.integer "tagger_id"
838   - t.string "tagger_type"
  857 + t.string "tagger_type", :limit => nil
839 858 t.string "context", :limit => 128
840 859 end
841 860  
... ... @@ -844,10 +863,10 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
844 863 add_index "taggings", ["taggable_id", "taggable_type"], :name => "index_taggings_on_taggable_id_and_taggable_type"
845 864  
846 865 create_table "tags", :force => true do |t|
847   - t.string "name"
  866 + t.string "name", :limit => nil
848 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 870 end
852 871  
853 872 add_index "tags", ["name"], :name => "index_tags_on_name", :unique => true
... ... @@ -860,11 +879,11 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
860 879 t.integer "requestor_id"
861 880 t.integer "target_id"
862 881 t.string "code", :limit => 40
863   - t.string "type"
  882 + t.string "type", :limit => nil
864 883 t.datetime "created_at"
865   - t.string "target_type"
  884 + t.string "target_type", :limit => nil
866 885 t.integer "image_id"
867   - t.boolean "spam", :default => false
  886 + t.boolean "spam", :default => false
868 887 t.integer "responsible_id"
869 888 t.integer "closed_by_id"
870 889 end
... ... @@ -885,45 +904,45 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
885 904  
886 905 create_table "thumbnails", :force => true do |t|
887 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 909 t.integer "height"
891 910 t.integer "width"
892 911 t.integer "parent_id"
893   - t.string "thumbnail"
  912 + t.string "thumbnail", :limit => nil
894 913 end
895 914  
896 915 add_index "thumbnails", ["parent_id"], :name => "index_thumbnails_on_parent_id"
897 916  
898 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 920 t.integer "position"
902   - t.integer "environment_id", :null => false
  921 + t.integer "environment_id", :null => false
903 922 end
904 923  
905 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 927 t.string "crypted_password", :limit => 40
909 928 t.string "salt", :limit => 40
910 929 t.datetime "created_at"
911 930 t.datetime "updated_at"
912   - t.string "remember_token"
  931 + t.string "remember_token", :limit => nil
913 932 t.datetime "remember_token_expires_at"
914 933 t.text "terms_of_use"
915 934 t.string "terms_accepted", :limit => 1
916 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 940 t.datetime "chat_status_at"
922 941 t.string "activation_code", :limit => 40
923 942 t.datetime "activated_at"
924   - t.string "return_to"
  943 + t.string "return_to", :limit => nil
925 944 t.datetime "last_login_at"
926   - t.string "private_token"
  945 + t.string "private_token", :limit => nil
927 946 t.datetime "private_token_generated_at"
928 947 end
929 948  
... ... @@ -934,11 +953,11 @@ ActiveRecord::Schema.define(:version => 20150918005035) do
934 953 end
935 954  
936 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 959 t.integer "voter_id"
941   - t.string "voter_type"
  960 + t.string "voter_type", :limit => nil
942 961 t.datetime "created_at"
943 962 t.datetime "updated_at"
944 963 end
... ...
plugins/dialoga
1   -Subproject commit b963a3fc7fb7df7853c97d5763dd2e11e35072e1
  1 +Subproject commit a068a1a80b97e5c47a48b1385d3917cbf855874d
... ...
plugins/email_article
1   -Subproject commit 53f8a41e372ee5f9bf4952be38e20d607daceb13
  1 +Subproject commit 7fd68d0efd3fd811907c541ac5e5cc00d46cf356
... ...
plugins/gamification
1   -Subproject commit 4d4afd7e7e60343336c20813dce47f327f8a729f
  1 +Subproject commit bea83c2384fd561acb4cddf17454616dd91fabd7
... ...
plugins/gravatar_provider
1   -Subproject commit ac0a5675237585c87ad4936b6d05624eb0ea95a0
  1 +Subproject commit 0ed74a2f55d85b3fdac6775fc1011804aa612213
... ...
plugins/juventude
1   -Subproject commit 67c4725c63b3dff680da9c99f776ed5e6f5b10bd
  1 +Subproject commit 6c9e4be69266f789f85120694ed5d28a0086bd55
... ...
plugins/pairwise
1   -Subproject commit 05580ed242147d378150fd8eed1457787c35afd8
  1 +Subproject commit a6ec8f30673c86423398f646d99b84cd8afd165a
... ...
plugins/proposals_discussion
1   -Subproject commit 5aa7a5fa14d9ba12b0588696449a5a89c60c1092
  1 +Subproject commit 92a1c4942628c7663716326fd418b7bb1d9c9e1c
... ...
script/load_juventude_proposal 0 → 100755
... ... @@ -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 +
... ...