commontator 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/commontator/version.rb +1 -1
- data/lib/commontator/version.rb~ +1 -1
- data/spec/app/controllers/comments_controller_spec.rb~ +7 -0
- data/spec/app/controllers/commontator/application_controller_spec.rb~ +30 -0
- data/spec/app/controllers/commontator/comments_controller_spec.rb +473 -0
- data/spec/app/controllers/commontator/comments_controller_spec.rb~ +473 -0
- data/spec/app/controllers/commontator/subscriptions_controller_spec.rb +99 -0
- data/spec/app/controllers/commontator/subscriptions_controller_spec.rb~ +99 -0
- data/spec/app/controllers/commontator/threads_controller_spec.rb +121 -0
- data/spec/app/controllers/commontator/threads_controller_spec.rb~ +121 -0
- data/spec/app/controllers/threads_controller_spec.rb~ +12 -0
- data/spec/app/helpers/commontator/application_helper_spec.rb +7 -0
- data/spec/app/helpers/commontator/application_helper_spec.rb~ +7 -0
- data/spec/app/helpers/commontator/threads_helper_spec.rb +17 -0
- data/spec/app/helpers/commontator/threads_helper_spec.rb~ +17 -0
- data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb +38 -0
- data/spec/app/mailers/commontator/subscriptions_mailer_spec.rb~ +37 -0
- data/spec/app/models/commontator/comment_spec.rb +60 -0
- data/spec/app/models/commontator/comment_spec.rb~ +60 -0
- data/spec/app/models/commontator/subscription_spec.rb +28 -0
- data/spec/app/models/commontator/subscription_spec.rb~ +28 -0
- data/spec/app/models/commontator/thread_spec.rb +130 -0
- data/spec/app/models/commontator/thread_spec.rb~ +130 -0
- data/spec/dummy/Gemfile~ +3 -0
- data/spec/dummy/README.md +3 -0
- data/spec/dummy/README.md~ +3 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/application_controller.rb~ +7 -0
- data/spec/dummy/app/controllers/dummies_controller.rb~ +17 -0
- data/spec/dummy/app/controllers/dummy_models_controller.rb +29 -0
- data/spec/dummy/app/controllers/dummy_models_controller.rb~ +29 -0
- data/spec/dummy/app/helpers/application_helper.rb +15 -0
- data/spec/dummy/app/helpers/application_helper.rb~ +15 -0
- data/spec/dummy/app/models/dummy.rb~ +3 -0
- data/spec/dummy/app/models/dummy_model.rb +3 -0
- data/spec/dummy/app/models/dummy_user.rb +9 -0
- data/spec/dummy/app/models/dummy_user.rb~ +9 -0
- data/spec/dummy/app/models/user.rb~ +5 -0
- data/spec/dummy/app/views/dummy_model/show.html.erb +1 -0
- data/spec/dummy/app/views/dummy_model/show.html.erb~ +1 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +59 -0
- data/spec/dummy/config/application.rb~ +59 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +37 -0
- data/spec/dummy/config/environments/production.rb +67 -0
- data/spec/dummy/config/environments/test.rb +37 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/commontator.rb +158 -0
- data/spec/dummy/config/initializers/commontator.rb~ +157 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +7 -0
- data/spec/dummy/config/routes.rb~ +7 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/0_create_dummies.rb~ +48 -0
- data/spec/dummy/db/migrate/0_create_dummy_models.rb +7 -0
- data/spec/dummy/db/migrate/0_create_dummy_models.rb~ +7 -0
- data/spec/dummy/db/migrate/1_create_dummy_users.rb +7 -0
- data/spec/dummy/db/migrate/1_create_dummy_users.rb~ +7 -0
- data/spec/dummy/db/migrate/1_create_users.rb~ +7 -0
- data/spec/dummy/db/migrate/2_install_commontator.rb +49 -0
- data/spec/dummy/db/migrate/2_install_commontator.rb~ +49 -0
- data/spec/dummy/db/migrate/3_acts_as_votable_migration.rb +20 -0
- data/spec/dummy/db/schema.rb +84 -0
- data/spec/dummy/db/schema.rb~ +71 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +14298 -0
- data/spec/dummy/log/test.log +149321 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/dummy/tmp/cache/assets/CCB/1D0/sprockets%2F02d4b791eb831cf2057bf4703a1218d1 +0 -0
- data/spec/dummy/tmp/cache/assets/CD1/510/sprockets%2Fc69ee3cc5796188d873574179290a6ef +0 -0
- data/spec/dummy/tmp/cache/assets/D01/8B0/sprockets%2F0f196a1a50363b0a076ec6e1ee5417f6 +0 -0
- data/spec/dummy/tmp/cache/assets/D06/2F0/sprockets%2Fe1f674c11941d62aac1764ef3a7134e4 +0 -0
- data/spec/dummy/tmp/cache/assets/D54/060/sprockets%2Fe85565206c3e5fdf9dfeb367c85557b1 +0 -0
- data/spec/dummy/tmp/cache/assets/D9B/550/sprockets%2Fa41c8be5379abec3c0d0d98e2f0d5609 +0 -0
- data/spec/dummy/tmp/cache/assets/E01/2E0/sprockets%2Fa3fb9025f90ff05a6fd4afc7ded2692c +0 -0
- data/spec/lib/commontator/acts_as_commontable_spec.rb +26 -0
- data/spec/lib/commontator/acts_as_commontable_spec.rb~ +26 -0
- data/spec/lib/commontator/acts_as_commontator_spec.rb +25 -0
- data/spec/lib/commontator/acts_as_commontator_spec.rb~ +25 -0
- data/spec/lib/commontator/commontable_config_spec.rb +26 -0
- data/spec/lib/commontator/commontable_config_spec.rb~ +26 -0
- data/spec/lib/commontator/commontator_config_spec.rb +26 -0
- data/spec/lib/commontator/commontator_config_spec.rb~ +26 -0
- data/spec/lib/commontator/controller_includes_spec.rb +15 -0
- data/spec/lib/commontator/controller_includes_spec.rb~ +15 -0
- data/spec/lib/commontator/shared_helper_spec.rb +12 -0
- data/spec/lib/commontator/shared_helper_spec.rb~ +12 -0
- data/spec/lib/commontator_spec.rb +23 -0
- data/spec/lib/commontator_spec.rb~ +23 -0
- data/spec/spec_helper.rb +34 -0
- data/spec/spec_helper.rb~ +30 -0
- metadata +212 -2
@@ -0,0 +1,15 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new inflection rules using the following format
|
4
|
+
# (all these examples are active by default):
|
5
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
6
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
7
|
+
# inflect.singular /^(ox)en/i, '\1'
|
8
|
+
# inflect.irregular 'person', 'people'
|
9
|
+
# inflect.uncountable %w( fish sheep )
|
10
|
+
# end
|
11
|
+
#
|
12
|
+
# These inflection rules are supported but not enabled by default:
|
13
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
14
|
+
# inflect.acronym 'RESTful'
|
15
|
+
# end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Your secret key for verifying the integrity of signed cookies.
|
4
|
+
# If you change this key, all old signed cookies will become invalid!
|
5
|
+
# Make sure the secret is at least 30 characters and all random,
|
6
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
+
Dummy::Application.config.secret_token = '1a767fd457fea42a0032b2b4adf0ca5a9dde2534fcccec295894ed2f9a341192b35ce7cc6583259eae5df55bcc57778ceb641ff7970bb57acaba51c4b3d2965f'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
4
|
+
|
5
|
+
# Use the database for sessions instead of the cookie-based default,
|
6
|
+
# which shouldn't be used to store highly confidential information
|
7
|
+
# (create the session table with "rails generate session_migration")
|
8
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
#
|
3
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
+
# is enabled by default.
|
5
|
+
|
6
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
+
ActiveSupport.on_load(:action_controller) do
|
8
|
+
wrap_parameters format: [:json]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Disable root element in JSON by default.
|
12
|
+
ActiveSupport.on_load(:active_record) do
|
13
|
+
self.include_root_in_json = false
|
14
|
+
end
|
Binary file
|
@@ -0,0 +1,48 @@
|
|
1
|
+
class CreateDummies < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table "dummies" do |t|
|
4
|
+
t.text "body"
|
5
|
+
t.integer "creator_id"
|
6
|
+
t.string "creator_type"
|
7
|
+
t.datetime "deleted_at"
|
8
|
+
t.integer "deleter_id"
|
9
|
+
t.string "deleter_type"
|
10
|
+
t.integer "thread_id"
|
11
|
+
|
12
|
+
t.integer "cached_votes_total", :default => 0
|
13
|
+
t.integer "cached_votes_up", :default => 0
|
14
|
+
t.integer "cached_votes_down", :default => 0
|
15
|
+
|
16
|
+
t.timestamps
|
17
|
+
end
|
18
|
+
|
19
|
+
create_table "commontator_subscriptions" do |t|
|
20
|
+
t.integer "subscriber_id"
|
21
|
+
t.string "subscriber_type"
|
22
|
+
t.integer "thread_id"
|
23
|
+
t.boolean "is_unread"
|
24
|
+
|
25
|
+
t.timestamps
|
26
|
+
end
|
27
|
+
|
28
|
+
create_table "commontator_threads" do |t|
|
29
|
+
t.integer "commontable_id"
|
30
|
+
t.string "commontable_type"
|
31
|
+
t.datetime "closed_at"
|
32
|
+
t.integer "closer_id"
|
33
|
+
t.string "closer_type"
|
34
|
+
|
35
|
+
t.timestamps
|
36
|
+
end
|
37
|
+
|
38
|
+
add_index :commontator_comments, [:creator_id, :creator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
|
39
|
+
add_index :commontator_comments, :thread_id
|
40
|
+
add_index :commontator_subscriptions, [:subscriber_id, :subscriber_type, :thread_id], :unique => true, :name => "index_c_s_on_s_id_and_s_type_and_t_id"
|
41
|
+
add_index :commontator_subscriptions, :thread_id
|
42
|
+
add_index :commontator_threads, [:commontable_id, :commontable_type]
|
43
|
+
|
44
|
+
add_index :commontator_comments, :cached_votes_total
|
45
|
+
add_index :commontator_comments, :cached_votes_up
|
46
|
+
add_index :commontator_comments, :cached_votes_down
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# This migration comes from commontator (originally 0)
|
2
|
+
class InstallCommontator < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table "commontator_comments" do |t|
|
5
|
+
t.text "body"
|
6
|
+
t.integer "creator_id"
|
7
|
+
t.string "creator_type"
|
8
|
+
t.datetime "deleted_at"
|
9
|
+
t.integer "deleter_id"
|
10
|
+
t.string "deleter_type"
|
11
|
+
t.integer "thread_id"
|
12
|
+
|
13
|
+
t.integer "cached_votes_total", :default => 0
|
14
|
+
t.integer "cached_votes_up", :default => 0
|
15
|
+
t.integer "cached_votes_down", :default => 0
|
16
|
+
|
17
|
+
t.timestamps
|
18
|
+
end
|
19
|
+
|
20
|
+
create_table "commontator_subscriptions" do |t|
|
21
|
+
t.integer "subscriber_id"
|
22
|
+
t.string "subscriber_type"
|
23
|
+
t.integer "thread_id"
|
24
|
+
t.integer "unread", :default => 0
|
25
|
+
|
26
|
+
t.timestamps
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "commontator_threads" do |t|
|
30
|
+
t.integer "commontable_id"
|
31
|
+
t.string "commontable_type"
|
32
|
+
t.datetime "closed_at"
|
33
|
+
t.integer "closer_id"
|
34
|
+
t.string "closer_type"
|
35
|
+
|
36
|
+
t.timestamps
|
37
|
+
end
|
38
|
+
|
39
|
+
add_index :commontator_comments, [:creator_id, :creator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
|
40
|
+
add_index :commontator_comments, :thread_id
|
41
|
+
add_index :commontator_subscriptions, [:subscriber_id, :subscriber_type, :thread_id], :unique => true, :name => "index_c_s_on_s_id_and_s_type_and_t_id"
|
42
|
+
add_index :commontator_subscriptions, :thread_id
|
43
|
+
add_index :commontator_threads, [:commontable_id, :commontable_type]
|
44
|
+
|
45
|
+
add_index :commontator_comments, :cached_votes_total
|
46
|
+
add_index :commontator_comments, :cached_votes_up
|
47
|
+
add_index :commontator_comments, :cached_votes_down
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# This migration comes from commontator (originally 0)
|
2
|
+
class InstallCommontator < ActiveRecord::Migration
|
3
|
+
def change
|
4
|
+
create_table "commontator_comments" do |t|
|
5
|
+
t.text "body"
|
6
|
+
t.integer "creator_id"
|
7
|
+
t.string "creator_type"
|
8
|
+
t.datetime "deleted_at"
|
9
|
+
t.integer "deleter_id"
|
10
|
+
t.string "deleter_type"
|
11
|
+
t.integer "thread_id"
|
12
|
+
|
13
|
+
t.integer "cached_votes_total", :default => 0
|
14
|
+
t.integer "cached_votes_up", :default => 0
|
15
|
+
t.integer "cached_votes_down", :default => 0
|
16
|
+
|
17
|
+
t.timestamps
|
18
|
+
end
|
19
|
+
|
20
|
+
create_table "commontator_subscriptions" do |t|
|
21
|
+
t.integer "subscriber_id"
|
22
|
+
t.string "subscriber_type"
|
23
|
+
t.integer "thread_id"
|
24
|
+
t.integer "unread"
|
25
|
+
|
26
|
+
t.timestamps
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "commontator_threads" do |t|
|
30
|
+
t.integer "commontable_id"
|
31
|
+
t.string "commontable_type"
|
32
|
+
t.datetime "closed_at"
|
33
|
+
t.integer "closer_id"
|
34
|
+
t.string "closer_type"
|
35
|
+
|
36
|
+
t.timestamps
|
37
|
+
end
|
38
|
+
|
39
|
+
add_index :commontator_comments, [:creator_id, :creator_type, :thread_id], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
|
40
|
+
add_index :commontator_comments, :thread_id
|
41
|
+
add_index :commontator_subscriptions, [:subscriber_id, :subscriber_type, :thread_id], :unique => true, :name => "index_c_s_on_s_id_and_s_type_and_t_id"
|
42
|
+
add_index :commontator_subscriptions, :thread_id
|
43
|
+
add_index :commontator_threads, [:commontable_id, :commontable_type]
|
44
|
+
|
45
|
+
add_index :commontator_comments, :cached_votes_total
|
46
|
+
add_index :commontator_comments, :cached_votes_up
|
47
|
+
add_index :commontator_comments, :cached_votes_down
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
class ActsAsVotableMigration < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :votes do |t|
|
4
|
+
|
5
|
+
t.references :votable, :polymorphic => true
|
6
|
+
t.references :voter, :polymorphic => true
|
7
|
+
|
8
|
+
t.boolean :vote_flag
|
9
|
+
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
|
13
|
+
add_index :votes, [:votable_id, :votable_type]
|
14
|
+
add_index :votes, [:voter_id, :voter_type]
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.down
|
18
|
+
drop_table :votes
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 3) do
|
15
|
+
|
16
|
+
create_table "commontator_comments", :force => true do |t|
|
17
|
+
t.text "body"
|
18
|
+
t.integer "creator_id"
|
19
|
+
t.string "creator_type"
|
20
|
+
t.datetime "deleted_at"
|
21
|
+
t.integer "deleter_id"
|
22
|
+
t.string "deleter_type"
|
23
|
+
t.integer "thread_id"
|
24
|
+
t.integer "cached_votes_total", :default => 0
|
25
|
+
t.integer "cached_votes_up", :default => 0
|
26
|
+
t.integer "cached_votes_down", :default => 0
|
27
|
+
t.datetime "created_at", :null => false
|
28
|
+
t.datetime "updated_at", :null => false
|
29
|
+
end
|
30
|
+
|
31
|
+
add_index "commontator_comments", ["cached_votes_down"], :name => "index_commontator_comments_on_cached_votes_down"
|
32
|
+
add_index "commontator_comments", ["cached_votes_total"], :name => "index_commontator_comments_on_cached_votes_total"
|
33
|
+
add_index "commontator_comments", ["cached_votes_up"], :name => "index_commontator_comments_on_cached_votes_up"
|
34
|
+
add_index "commontator_comments", ["creator_id", "creator_type", "thread_id"], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
|
35
|
+
add_index "commontator_comments", ["thread_id"], :name => "index_commontator_comments_on_thread_id"
|
36
|
+
|
37
|
+
create_table "commontator_subscriptions", :force => true do |t|
|
38
|
+
t.integer "subscriber_id"
|
39
|
+
t.string "subscriber_type"
|
40
|
+
t.integer "thread_id"
|
41
|
+
t.integer "unread", :default => 0
|
42
|
+
t.datetime "created_at", :null => false
|
43
|
+
t.datetime "updated_at", :null => false
|
44
|
+
end
|
45
|
+
|
46
|
+
add_index "commontator_subscriptions", ["subscriber_id", "subscriber_type", "thread_id"], :name => "index_c_s_on_s_id_and_s_type_and_t_id", :unique => true
|
47
|
+
add_index "commontator_subscriptions", ["thread_id"], :name => "index_commontator_subscriptions_on_thread_id"
|
48
|
+
|
49
|
+
create_table "commontator_threads", :force => true do |t|
|
50
|
+
t.integer "commontable_id"
|
51
|
+
t.string "commontable_type"
|
52
|
+
t.datetime "closed_at"
|
53
|
+
t.integer "closer_id"
|
54
|
+
t.string "closer_type"
|
55
|
+
t.datetime "created_at", :null => false
|
56
|
+
t.datetime "updated_at", :null => false
|
57
|
+
end
|
58
|
+
|
59
|
+
add_index "commontator_threads", ["commontable_id", "commontable_type"], :name => "index_commontator_threads_on_commontable_id_and_commontable_type"
|
60
|
+
|
61
|
+
create_table "dummy_models", :force => true do |t|
|
62
|
+
t.datetime "created_at", :null => false
|
63
|
+
t.datetime "updated_at", :null => false
|
64
|
+
end
|
65
|
+
|
66
|
+
create_table "dummy_users", :force => true do |t|
|
67
|
+
t.datetime "created_at", :null => false
|
68
|
+
t.datetime "updated_at", :null => false
|
69
|
+
end
|
70
|
+
|
71
|
+
create_table "votes", :force => true do |t|
|
72
|
+
t.integer "votable_id"
|
73
|
+
t.string "votable_type"
|
74
|
+
t.integer "voter_id"
|
75
|
+
t.string "voter_type"
|
76
|
+
t.boolean "vote_flag"
|
77
|
+
t.datetime "created_at", :null => false
|
78
|
+
t.datetime "updated_at", :null => false
|
79
|
+
end
|
80
|
+
|
81
|
+
add_index "votes", ["votable_id", "votable_type"], :name => "index_votes_on_votable_id_and_votable_type"
|
82
|
+
add_index "votes", ["voter_id", "voter_type"], :name => "index_votes_on_voter_id_and_voter_type"
|
83
|
+
|
84
|
+
end
|
@@ -0,0 +1,71 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
# This file is auto-generated from the current state of the database. Instead
|
3
|
+
# of editing this file, please use the migrations feature of Active Record to
|
4
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
+
#
|
6
|
+
# Note that this schema.rb definition is the authoritative source for your
|
7
|
+
# database schema. If you need to create the application database on another
|
8
|
+
# system, you should be using db:schema:load, not running all the migrations
|
9
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
+
#
|
12
|
+
# It's strongly recommended to check this file into your version control system.
|
13
|
+
|
14
|
+
ActiveRecord::Schema.define(:version => 2) do
|
15
|
+
|
16
|
+
create_table "commontator_comments", :force => true do |t|
|
17
|
+
t.text "body"
|
18
|
+
t.integer "creator_id"
|
19
|
+
t.string "creator_type"
|
20
|
+
t.datetime "deleted_at"
|
21
|
+
t.integer "deleter_id"
|
22
|
+
t.string "deleter_type"
|
23
|
+
t.integer "thread_id"
|
24
|
+
t.integer "cached_votes_total", :default => 0
|
25
|
+
t.integer "cached_votes_up", :default => 0
|
26
|
+
t.integer "cached_votes_down", :default => 0
|
27
|
+
t.datetime "created_at", :null => false
|
28
|
+
t.datetime "updated_at", :null => false
|
29
|
+
end
|
30
|
+
|
31
|
+
add_index "commontator_comments", ["cached_votes_down"], :name => "index_commontator_comments_on_cached_votes_down"
|
32
|
+
add_index "commontator_comments", ["cached_votes_total"], :name => "index_commontator_comments_on_cached_votes_total"
|
33
|
+
add_index "commontator_comments", ["cached_votes_up"], :name => "index_commontator_comments_on_cached_votes_up"
|
34
|
+
add_index "commontator_comments", ["creator_id", "creator_type", "thread_id"], :name => "index_c_c_on_c_id_and_c_type_and_t_id"
|
35
|
+
add_index "commontator_comments", ["thread_id"], :name => "index_commontator_comments_on_thread_id"
|
36
|
+
|
37
|
+
create_table "commontator_subscriptions", :force => true do |t|
|
38
|
+
t.integer "subscriber_id"
|
39
|
+
t.string "subscriber_type"
|
40
|
+
t.integer "thread_id"
|
41
|
+
t.boolean "is_unread"
|
42
|
+
t.datetime "created_at", :null => false
|
43
|
+
t.datetime "updated_at", :null => false
|
44
|
+
end
|
45
|
+
|
46
|
+
add_index "commontator_subscriptions", ["subscriber_id", "subscriber_type", "thread_id"], :name => "index_c_s_on_s_id_and_s_type_and_t_id", :unique => true
|
47
|
+
add_index "commontator_subscriptions", ["thread_id"], :name => "index_commontator_subscriptions_on_thread_id"
|
48
|
+
|
49
|
+
create_table "commontator_threads", :force => true do |t|
|
50
|
+
t.integer "commontable_id"
|
51
|
+
t.string "commontable_type"
|
52
|
+
t.datetime "closed_at"
|
53
|
+
t.integer "closer_id"
|
54
|
+
t.string "closer_type"
|
55
|
+
t.datetime "created_at", :null => false
|
56
|
+
t.datetime "updated_at", :null => false
|
57
|
+
end
|
58
|
+
|
59
|
+
add_index "commontator_threads", ["commontable_id", "commontable_type"], :name => "index_commontator_threads_on_commontable_id_and_commontable_type"
|
60
|
+
|
61
|
+
create_table "dummy_models", :force => true do |t|
|
62
|
+
t.datetime "created_at", :null => false
|
63
|
+
t.datetime "updated_at", :null => false
|
64
|
+
end
|
65
|
+
|
66
|
+
create_table "users", :force => true do |t|
|
67
|
+
t.datetime "created_at", :null => false
|
68
|
+
t.datetime "updated_at", :null => false
|
69
|
+
end
|
70
|
+
|
71
|
+
end
|