thredded 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. checksums.yaml +4 -4
  2. metadata +7 -114
  3. data/MIT-LICENSE +0 -20
  4. data/README.mkdn +0 -72
  5. data/Rakefile +0 -31
  6. data/app/assets/javascripts/thredded/application.js +0 -15
  7. data/app/assets/stylesheets/thredded/application.css +0 -13
  8. data/app/controllers/thredded/application_controller.rb +0 -60
  9. data/app/controllers/thredded/emails_controller.rb +0 -4
  10. data/app/controllers/thredded/messageboards_controller.rb +0 -7
  11. data/app/controllers/thredded/posts_controller.rb +0 -85
  12. data/app/controllers/thredded/preferences_controller.rb +0 -28
  13. data/app/controllers/thredded/private_topics_controller.rb +0 -58
  14. data/app/controllers/thredded/setups_controller.rb +0 -44
  15. data/app/controllers/thredded/topics_controller.rb +0 -99
  16. data/app/decorators/thredded/messageboard_decorator.rb +0 -74
  17. data/app/decorators/thredded/post_decorator.rb +0 -61
  18. data/app/decorators/thredded/topic_decorator.rb +0 -94
  19. data/app/decorators/thredded/user_topic_decorator.rb +0 -88
  20. data/app/helpers/thredded/application_helper.rb +0 -4
  21. data/app/helpers/thredded/posts_helper.rb +0 -7
  22. data/app/helpers/thredded/topics_helper.rb +0 -4
  23. data/app/mailers/thredded/post_mailer.rb +0 -28
  24. data/app/mailers/thredded/topic_mailer.rb +0 -29
  25. data/app/models/thredded/ability.rb +0 -66
  26. data/app/models/thredded/attachment.rb +0 -23
  27. data/app/models/thredded/category.rb +0 -9
  28. data/app/models/thredded/image.rb +0 -26
  29. data/app/models/thredded/messageboard.rb +0 -117
  30. data/app/models/thredded/messageboard_preference.rb +0 -14
  31. data/app/models/thredded/null_preference.rb +0 -11
  32. data/app/models/thredded/null_topic.rb +0 -16
  33. data/app/models/thredded/null_topic_read.rb +0 -19
  34. data/app/models/thredded/null_user.rb +0 -35
  35. data/app/models/thredded/post.rb +0 -120
  36. data/app/models/thredded/post_notification.rb +0 -5
  37. data/app/models/thredded/private_topic.rb +0 -42
  38. data/app/models/thredded/private_user.rb +0 -6
  39. data/app/models/thredded/role.rb +0 -16
  40. data/app/models/thredded/topic.rb +0 -154
  41. data/app/models/thredded/topic_category.rb +0 -6
  42. data/app/models/thredded/user_detail.rb +0 -6
  43. data/app/models/thredded/user_extender.rb +0 -21
  44. data/app/models/thredded/user_preference.rb +0 -6
  45. data/app/models/thredded/user_topic_read.rb +0 -9
  46. data/app/uploaders/thredded/attachment_uploader.rb +0 -30
  47. data/app/uploaders/thredded/image_uploader.rb +0 -16
  48. data/app/views/thredded/attachments/_attachment.html.erb +0 -7
  49. data/app/views/thredded/messageboards/_messageboard.html.erb +0 -20
  50. data/app/views/thredded/messageboards/index.html.erb +0 -18
  51. data/app/views/thredded/post_mailer/at_notification.html.erb +0 -17
  52. data/app/views/thredded/post_mailer/at_notification.text.erb +0 -13
  53. data/app/views/thredded/posts/_form.html.erb +0 -17
  54. data/app/views/thredded/posts/_null_user.html.erb +0 -0
  55. data/app/views/thredded/posts/_post.html.erb +0 -29
  56. data/app/views/thredded/posts/_user.html.erb +0 -7
  57. data/app/views/thredded/posts/edit.html.erb +0 -31
  58. data/app/views/thredded/posts/index.html.erb +0 -64
  59. data/app/views/thredded/preferences/edit.html.erb +0 -22
  60. data/app/views/thredded/private_topics/_form.html.erb +0 -15
  61. data/app/views/thredded/private_topics/index.html.erb +0 -34
  62. data/app/views/thredded/private_topics/new.html.erb +0 -28
  63. data/app/views/thredded/search/_form.html.erb +0 -9
  64. data/app/views/thredded/setups/_form.html.erb +0 -35
  65. data/app/views/thredded/setups/new.html.erb +0 -6
  66. data/app/views/thredded/shared/_currently_online.html.erb +0 -10
  67. data/app/views/thredded/shared/_error_msgs.html.erb +0 -7
  68. data/app/views/thredded/shared/_google_analytics.html.erb +0 -10
  69. data/app/views/thredded/shared/_topic_nav.html.erb +0 -21
  70. data/app/views/thredded/topic_mailer/message_notification.html.erb +0 -17
  71. data/app/views/thredded/topic_mailer/message_notification.text.erb +0 -13
  72. data/app/views/thredded/topics/_form.html.erb +0 -6
  73. data/app/views/thredded/topics/_recent_topics_by_user.html.erb +0 -8
  74. data/app/views/thredded/topics/_topic_condensed.html.erb +0 -24
  75. data/app/views/thredded/topics/_topic_form.html.erb +0 -27
  76. data/app/views/thredded/topics/by_category.html.erb +0 -54
  77. data/app/views/thredded/topics/edit.html.erb +0 -28
  78. data/app/views/thredded/topics/index.html.erb +0 -34
  79. data/app/views/thredded/topics/menu/_new_topic.html.erb +0 -3
  80. data/app/views/thredded/topics/new.html.erb +0 -21
  81. data/app/views/thredded/topics/search.html.erb +0 -34
  82. data/config/initializers/griddler.rb +0 -4
  83. data/config/routes.rb +0 -29
  84. data/db/migrate/20130425230852_create_thredded_tables.rb +0 -143
  85. data/db/migrate/20131005032727_prevent_null_sticky_and_locked.rb +0 -15
  86. data/db/migrate/20131014014258_uniqs_on_user_topic_read.rb +0 -9
  87. data/db/migrate/20131019014258_index_necessary_columns.rb +0 -24
  88. data/db/migrate/20131026202621_move_filter_to_messageboards.rb +0 -11
  89. data/db/migrate/20131029034507_convert_textile_to_markdown.rb +0 -7
  90. data/lib/html/pipeline/at_mention_filter.rb +0 -19
  91. data/lib/html/pipeline/attached_image_filter.rb +0 -59
  92. data/lib/html/pipeline/bbcode_filter.rb +0 -19
  93. data/lib/tasks/thredded_tasks.rake +0 -4
  94. data/lib/thredded.rb +0 -58
  95. data/lib/thredded/at_notification_extractor.rb +0 -15
  96. data/lib/thredded/at_notifier.rb +0 -67
  97. data/lib/thredded/at_users.rb +0 -19
  98. data/lib/thredded/email_processor.rb +0 -76
  99. data/lib/thredded/engine.rb +0 -17
  100. data/lib/thredded/errors.rb +0 -40
  101. data/lib/thredded/messageboard_user_permissions.rb +0 -27
  102. data/lib/thredded/post_sql_builder.rb +0 -34
  103. data/lib/thredded/post_user_permissions.rb +0 -41
  104. data/lib/thredded/private_topic_notifier.rb +0 -56
  105. data/lib/thredded/private_topic_user_permissions.rb +0 -38
  106. data/lib/thredded/search_parser.rb +0 -45
  107. data/lib/thredded/search_sql_builder.rb +0 -25
  108. data/lib/thredded/setup_thredded.rb +0 -7
  109. data/lib/thredded/table_sql_builder.rb +0 -105
  110. data/lib/thredded/topic_sql_builder.rb +0 -32
  111. data/lib/thredded/topic_user_permissions.rb +0 -55
  112. data/lib/thredded/version.rb +0 -3
@@ -1,6 +0,0 @@
1
- <% content_for :thredded_page_title, 'Set Up Thredded' %>
2
- <% content_for :thredded_page_id, 'thredded_new_setup' %>
3
-
4
- <h1>Setup</h1>
5
-
6
- <%= render 'form' %>
@@ -1,10 +0,0 @@
1
- <% if messageboard %>
2
- <div class="online">
3
- <h3>Currently Online</h3>
4
- <ul>
5
- <% messageboard.active_users.each do |user| %>
6
- <li><%= user %></li>
7
- <% end %>
8
- </ul>
9
- </div>
10
- <% end %>
@@ -1,7 +0,0 @@
1
- <% [:info, :error, :notice, :alert, :warning].each do |key| %>
2
- <% if flash[key] %>
3
- <div class="<%= key %>" id="flash">
4
- <%= flash[key] %>
5
- </div>
6
- <% end %>
7
- <% end %>
@@ -1,10 +0,0 @@
1
- <script type="text/javascript">
2
- var _gaq = _gaq || [];
3
- _gaq.push(['_setAccount', '<%= ENV['GOOGLE_ANALYTICS_ID'] %>']);
4
- _gaq.push(['_trackPageview']);
5
- (function() {
6
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
7
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
8
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
9
- })();
10
- </script>
@@ -1,21 +0,0 @@
1
- <div class="topic_nav <%= controller_name %>">
2
- <% cache ['topic-nav-actions', current_user, messageboard] do %>
3
- <% if can? :create, messageboard.topics.build %>
4
- <ul class="actions">
5
- <li class='new_topic'><%= link_to 'new topic', new_messageboard_topic_path(messageboard) %></li>
6
- <li class='new_private_topic'><%= link_to 'private topic', new_messageboard_private_topic_path(messageboard) %></li>
7
- </ul>
8
- <% end %>
9
- <% end %>
10
-
11
- <ul class="listings">
12
- <% cache ['topic-nav-list', current_user, messageboard] do %>
13
- <li class="topic_list"><%= link_to 'topics', messageboard_topics_path %></li>
14
- <% if can? :list, messageboard.private_topics.build %>
15
- <li class="private_topic_list"><%= link_to 'private topics', messageboard_private_topics_path %></li>
16
- <% end %>
17
- <% end %>
18
-
19
- <%= render 'thredded/search/form' %>
20
- </ul>
21
- </div>
@@ -1,17 +0,0 @@
1
- <p><span style="font-size:11px; color: gray;">- write above this line to post a reply -</span></p>
2
-
3
- <%== @topic.posts.first.filtered_content %>
4
-
5
- <hr />
6
-
7
- <p>
8
- This email was sent to you because <%= @topic.user %> included you in a
9
- private topic, "<%= link_to @topic.title, messageboard_topic_posts_url(@topic.messageboard, @topic) %>".
10
- Feel free to reply above or <%= link_to 'head to the thread', messageboard_topic_posts_url(@topic.messageboard, @topic) %>
11
- to view the conversation.
12
- </p>
13
-
14
- <p>
15
- To unsubscribe from these emails, update your
16
- <%= link_to 'preferences', edit_messageboard_preferences_url(@topic.messageboard) %>.
17
- </p>
@@ -1,13 +0,0 @@
1
- - write above this line to post a reply -
2
-
3
- <%= @topic.posts.first.content %>
4
-
5
- ---
6
-
7
- This email was sent to you because <%= @topic.user %>
8
- included you in the private topic "<%= @topic.title %>". Feel free to reply
9
- above or head to the following to view the conversation:
10
- <%= messageboard_topic_posts_url(@topic.messageboard, @topic) %>
11
-
12
- To unsubscribe from these emails, update your preferences here:
13
- <%= edit_messageboard_preferences_url(@topic.messageboard) %>
@@ -1,6 +0,0 @@
1
- <li class="title">
2
- <%= form.label :title %>
3
- <%= form.text_field :title, { placeholder: 'Title', autofocus: 'autofocus', } %>
4
- </li>
5
-
6
- <%= render 'topic_form', form: form, messageboard: messageboard %>
@@ -1,8 +0,0 @@
1
- <% if thredded_abilities.can? :read, topic %>
2
- <tr>
3
- <td class="title table-first-column"> <%= topic.title %> </td>
4
- <td class="replies"> <%= topic.posts_count %> </td>
5
- <td class="created"> <%= formatted_user_profile_date(topic.created_at) %> </td>
6
- <td class="updated"> <%= formatted_user_profile_date(topic.updated_at) %> </td>
7
- </tr>
8
- <% end %>
@@ -1,24 +0,0 @@
1
- <% if can? :read, topic.original %>
2
- <%= content_tag_for :article, topic, class: topic.css_class do %>
3
- <div class="post_count"><%= topic.posts_count %></div>
4
-
5
- <h1>
6
- <%= link_to topic.title,
7
- paged_messageboard_topic_posts_path(
8
- messageboard.slug,
9
- topic.slug,
10
- topic.farthest_page
11
- ) %>
12
- </h1>
13
-
14
- <cite class="updated_by">
15
- <%= topic.updated_at_timeago %>
16
- <%= topic.last_user_link %>
17
- </cite>
18
-
19
- <cite class="started_by">
20
- <%= topic.created_at_timeago %>
21
- <%= topic.user_link %>
22
- </cite>
23
- <% end %>
24
- <% end %>
@@ -1,27 +0,0 @@
1
- <% if messageboard.categories.any? %>
2
- <li class="category">
3
- <%= form.select :category_ids,
4
- messageboard.category_options,
5
- {}, { multiple: true, 'data-placeholder' => 'Categories' } %>
6
- </li>
7
- <% end %>
8
-
9
- <% if can? :admin, form.object %>
10
- <li class="locked">
11
- <%= form.label :locked do %>
12
- Locked <%= form.check_box :locked %>
13
- <% end %>
14
- </li>
15
-
16
- <li class="sticky">
17
- <%= form.label :sticky do %>
18
- Sticky <%= form.check_box :sticky %>
19
- <% end %>
20
- </li>
21
- <% end %>
22
-
23
- <% if action_name != 'edit' %>
24
- <%= form.fields_for :posts do |post_form| %>
25
- <%= render 'thredded/posts/form', f: post_form %>
26
- <% end %>
27
- <% end %>
@@ -1,54 +0,0 @@
1
- <% content_for :thredded_page_title, 'Topic Categories' %>
2
- <% content_for :thredded_page_id, 'thredded_topic_categories' %>
3
-
4
- <% content_for :breadcrumbs do %>
5
- <ul class="breadcrumbs">
6
- <li><%= link_to 'Forums', thredded.root_path %></li>
7
- <li><%= link_to messageboard.title, messageboard_topics_path(messageboard) %></li>
8
- <li><span>Category</span></li>
9
- </ul>
10
- <% end %>
11
-
12
- <% content_for :actions do %>
13
- <ul class="actions">
14
- <%= render 'thredded/search/form' %>
15
-
16
- <% if can? :create, Thredded::Topic %>
17
- <li class='new_topic'>
18
- <%= link_to 'new topic', new_messageboard_topic_path(messageboard) %>
19
- </li>
20
- <li class='new_private_topic'>
21
- <%= link_to 'private topic', new_messageboard_private_topic_path(messageboard) %>
22
- </li>
23
- <% end %>
24
- </ul>
25
- <% end %>
26
-
27
- <header>
28
- <nav>
29
- <%= yield :breadcrumbs %>
30
- <%= yield :actions %>
31
- </nav>
32
-
33
- <%= render 'thredded/shared/currently_online' %>
34
- </header>
35
-
36
- <section class="topics">
37
- <% if @sticky.any? %>
38
- <div class="stuck">
39
- <%= render partial: 'thredded/topics/topic_condensed', collection: @sticky, as: :t %>
40
- </div>
41
- <% end %>
42
-
43
- <div class="currently">
44
- <%= render partial: 'thredded/topics/topic_condensed', collection: @topics, as: :t %>
45
- </div>
46
- </section>
47
-
48
- <footer>
49
- <%= paginate @topics %>
50
- <nav>
51
- <%= yield :actions %>
52
- <%= yield :breadcrumbs %>
53
- </nav>
54
- </footer>
@@ -1,28 +0,0 @@
1
- <% content_for :thredded_page_title, "Edit \"#{topic.title}\"" %>
2
- <% content_for :thredded_page_id, 'thredded_edit_topic' %>
3
-
4
- <header>
5
- <nav>
6
- <ul class="breadcrumbs">
7
- <li><%= link_to 'Forums', thredded.root_path %></li>
8
- <li><%= link_to messageboard.name, messageboard_topics_path(messageboard, topic) %></li>
9
- <li>
10
- <span>
11
- Editing Topic <em><%= link_to topic.title, [messageboard, topic] %></em>
12
- </span>
13
- </li>
14
- </ul>
15
- </nav>
16
- </header>
17
-
18
- <div class="forms">
19
- <ul>
20
- <%= nested_form_for [@messageboard, @topic], html: { class: :topic_form, multipart: true } do |form| %>
21
- <%= render 'form', form: form, messageboard: messageboard.decorate %>
22
-
23
- <li class="submit">
24
- <%= form.submit 'Update Topic' %>
25
- </li>
26
- <% end %>
27
- </ul>
28
- </div>
@@ -1,34 +0,0 @@
1
- <% content_for :thredded_page_title, 'Topics' %>
2
- <% content_for :thredded_page_id, 'thredded_topics_index' %>
3
-
4
- <% content_for :breadcrumbs do %>
5
- <ul class="breadcrumbs">
6
- <li><%= link_to 'Forums', thredded.root_path %></li>
7
- <li><span><%= messageboard.name %></span></li>
8
- </ul>
9
- <% end %>
10
-
11
- <header>
12
- <nav>
13
- <%= yield :breadcrumbs %>
14
- </nav>
15
-
16
- <%= render 'thredded/shared/currently_online' %>
17
- <%= render 'thredded/shared/topic_nav' %>
18
- </header>
19
-
20
- <section class="topics" id="topics_listing">
21
- <div class="currently">
22
- <%= render partial: 'thredded/topics/topic_condensed',
23
- collection: Thredded::UserTopicDecorator.decorate_all(current_user, @topics),
24
- as: :topic %>
25
- </div>
26
- </section>
27
-
28
- <footer>
29
- <%= paginate @topics %>
30
-
31
- <nav>
32
- <%= yield :breadcrumbs %>
33
- </nav>
34
- </footer>
@@ -1,3 +0,0 @@
1
- <li>
2
- <%= link_to 'New Topic', new_messageboard_topic_path %>
3
- </li>
@@ -1,21 +0,0 @@
1
- <% content_for :thredded_page_title, 'Create a New Topic' %>
2
- <% content_for :thredded_page_id, 'thredded_new_topic' %>
3
-
4
- <header>
5
- <nav>
6
- <ul class="breadcrumbs">
7
- <li><%= link_to 'Forums', thredded.root_path %></li>
8
- <li><%= link_to messageboard.name, [messageboard, @topic] %></li>
9
- <li><span>Create New Topic</span></li>
10
- </ul>
11
- </nav>
12
- </header>
13
-
14
- <div class="topic forms">
15
- <%= nested_form_for [messageboard, @topic], html: { multipart: true } do |form| %>
16
- <ul>
17
- <%= render 'form', form: form, messageboard: messageboard.decorate %>
18
- <li class="submit"><%= form.submit 'Create New Topic' %></li>
19
- </ul>
20
- <% end %>
21
- </div>
@@ -1,34 +0,0 @@
1
- <% content_for :thredded_page_title, 'Search Results' %>
2
- <% content_for :thredded_page_id, 'thredded_topic_search_results' %>
3
-
4
- <% content_for :breadcrumbs do %>
5
- <ul class="breadcrumbs">
6
- <li><%= link_to 'Forums', thredded.root_path %></li>
7
- <li><%= link_to messageboard.name,
8
- messageboard_topics_path(messageboard) %></li>
9
- <li><span>Results for "<%= params[:q]%>"</span></li>
10
- </ul>
11
- <% end %>
12
-
13
- <header>
14
- <nav>
15
- <%= yield :breadcrumbs %>
16
- </nav>
17
-
18
- <%= render 'thredded/shared/currently_online' %>
19
- <%= render 'thredded/shared/topic_nav' %>
20
- </header>
21
-
22
- <section class="topics" id="topics_listing">
23
- <div class="currently">
24
- <%= render partial: 'thredded/topics/topic_condensed',
25
- collection: Thredded::UserTopicDecorator.decorate_all(current_user, @topics),
26
- as: :topic %>
27
- </div>
28
- </section>
29
-
30
- <footer>
31
- <nav>
32
- <%= yield :breadcrumbs %>
33
- </nav>
34
- </footer>
@@ -1,4 +0,0 @@
1
- ::Griddler.configure do |config|
2
- config.processor_class = Thredded::EmailProcessor
3
- config.to = :token
4
- end
@@ -1,29 +0,0 @@
1
- require 'thredded/setup_thredded'
2
-
3
- Thredded::Engine.routes.draw do
4
- post '/mail/receive' => 'emails#create', as: :mail_receive
5
-
6
- constraints(Thredded::SetupThredded.new) do
7
- resources :setups, path: '', only: [:new, :create]
8
- root to: 'setups#new'
9
- end
10
-
11
- constraints(lambda{|req| req.env['QUERY_STRING'].include? 'q=' }) do
12
- get '/:messageboard_id(.:format)' => 'topics#search', as: :messageboard_search
13
- end
14
-
15
- get '/:messageboard_id/preferences/edit' => 'preferences#edit'
16
- get '/:messageboard_id/new(.:format)' => 'topics#new', as: :new_messageboard_topic
17
- get '/:messageboard_id/:id/edit(.:format)' => 'topics#edit', as: :edit_messageboard_topic
18
- get '/:messageboard_id/:topic_id/page-:page(.:format)' => 'posts#index',
19
- as: :paged_messageboard_topic_posts, constraints: { page: /\d+/ }
20
-
21
- resources :messageboards, only: [:index], path: '' do
22
- resource :preferences, only: [:edit, :update]
23
- resources :private_topics, only: [:new, :create, :index]
24
-
25
- resources :topics, except: [:show], path: '' do
26
- resources :posts, path: ''
27
- end
28
- end
29
- end
@@ -1,143 +0,0 @@
1
- class CreateThreddedTables < ActiveRecord::Migration
2
- def change
3
- create_table :thredded_attachments do |t|
4
- t.string :attachment
5
- t.string :content_type
6
- t.integer :file_size
7
- t.integer :post_id
8
- t.timestamps
9
- end
10
-
11
- create_table :thredded_categories do |t|
12
- t.integer :messageboard_id, null: false
13
- t.string :name, null: false
14
- t.string :description
15
- t.timestamps
16
- end
17
-
18
- create_table :thredded_images do |t|
19
- t.integer :post_id
20
- t.integer :width
21
- t.integer :height
22
- t.string :orientation
23
- t.timestamps
24
- end
25
-
26
- create_table :thredded_messageboards do |t|
27
- t.string :name, null: false
28
- t.string :slug
29
- t.text :description
30
- t.string :security, default: 'public'
31
- t.string :posting_permission, default: 'anonymous'
32
- t.integer :topics_count, default: 0
33
- t.integer :posts_count, default: 0
34
- t.boolean :closed, default: false, null: false
35
- t.timestamps
36
- end
37
-
38
- add_index :thredded_messageboards, :closed
39
-
40
- create_table :thredded_post_notifications do |t|
41
- t.string :email, null: false
42
- t.integer :post_id, null: false
43
- t.timestamps
44
- end
45
-
46
- create_table :thredded_posts do |t|
47
- t.integer :user_id
48
- t.string :user_email
49
- t.text :content
50
- t.string :ip
51
- t.string :filter, default: 'markdown'
52
- t.string :source, default: 'web'
53
- t.integer :topic_id, null: false
54
- t.integer :messageboard_id, null: false
55
- t.timestamps
56
- end
57
-
58
- create_table :thredded_private_users do |t|
59
- t.integer :private_topic_id
60
- t.integer :user_id
61
- t.timestamps
62
- end
63
-
64
- create_table :thredded_messageboard_preferences do |t|
65
- t.boolean :notify_on_mention, default: true
66
- t.boolean :notify_on_message, default: true
67
- t.string :filter, default: 'markdown', null: false
68
- t.integer :user_id, null: false
69
- t.integer :messageboard_id, null: false
70
- t.timestamps
71
- end
72
-
73
- add_index :thredded_messageboard_preferences, :user_id
74
- add_index :thredded_messageboard_preferences, :messageboard_id
75
-
76
- create_table :thredded_roles do |t|
77
- t.string :level
78
- t.integer :user_id
79
- t.integer :messageboard_id
80
- t.datetime :last_seen
81
- t.timestamps
82
- end
83
-
84
- add_index :thredded_roles, :user_id
85
- add_index :thredded_roles, :messageboard_id
86
-
87
- create_table :thredded_topic_categories do |t|
88
- t.integer :topic_id, null: false
89
- t.integer :category_id, null: false
90
- end
91
-
92
- create_table :thredded_topics do |t|
93
- t.integer :user_id, null: false
94
- t.integer :last_user_id, null: false
95
- t.string :title, null: false
96
- t.string :slug, null: false
97
- t.integer :messageboard_id, null: false
98
- t.integer :posts_count, default: 0
99
- t.string :attribs, default: '[]'
100
- t.boolean :sticky, default: false
101
- t.boolean :locked, default: false
102
- t.string :hash_id, null: false
103
- t.string :state, default: 'approved', null: false
104
- t.string :type
105
- t.timestamps
106
- end
107
-
108
- create_table :thredded_user_details do |t|
109
- t.integer :user_id, null: false
110
- t.datetime :latest_activity_at
111
- t.integer :posts_count, default: 0
112
- t.integer :topics_count, default: 0
113
- t.boolean :superadmin, default: false
114
- t.timestamps
115
- end
116
-
117
- add_index :thredded_user_details, :user_id
118
- add_index :thredded_user_details, :latest_activity_at
119
-
120
- create_table :thredded_user_preferences do |t|
121
- t.integer :user_id, null: false
122
- t.string :time_zone, default: 'Eastern Time (US & Canada)'
123
- t.timestamps
124
- end
125
-
126
- add_index :thredded_user_preferences, :user_id
127
-
128
- create_table :thredded_user_topic_reads do |t|
129
- t.integer :user_id, null: false
130
- t.integer :topic_id, null: false
131
- t.integer :post_id, null: false
132
- t.integer :posts_count, default: 0, null: false
133
- t.integer :page, default: 1, null: false
134
- t.timestamps
135
- end
136
-
137
- add_index :thredded_user_topic_reads, :user_id
138
- add_index :thredded_user_topic_reads, :topic_id
139
- add_index :thredded_user_topic_reads, :post_id
140
- add_index :thredded_user_topic_reads, :page
141
- add_index :thredded_user_topic_reads, :posts_count
142
- end
143
- end