acts_as_messenger 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -19,3 +19,5 @@ rdoc
19
19
  pkg
20
20
 
21
21
  ## PROJECT::SPECIFIC
22
+ spec/database.yml
23
+ *.log
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{acts_as_messenger}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Mike Nelson"]
@@ -33,8 +33,6 @@ Gem::Specification.new do |s|
33
33
  "lib/acts_as_messenger/message.rb",
34
34
  "lib/acts_as_messenger/thread.rb",
35
35
  "spec/acts_as_messenger_spec.rb",
36
- "spec/database.yml",
37
- "spec/debug.log",
38
36
  "spec/models/user.rb",
39
37
  "spec/schema.rb",
40
38
  "spec/spec.opts",
@@ -20,7 +20,7 @@ module SocialButterfly
20
20
  module InstanceMethods
21
21
  def send_message(title, body, recips)
22
22
  thread = ::MessageThread.create(:author => self, :title => title, :body => body, :private_thread => true)
23
- thread.recipients = [recips].flatten.uniq.collect{|r| rdata = recipient_data(r); thread.recipients.create(:receiver_id => rdata[0], :receiver_type => rdata[1])}
23
+ thread.recipients = [recips].flatten.uniq.collect{|recip| rdata = recipient_data(recip); thread.recipients.create(:receiver_id => rdata[0], :receiver_type => rdata[1])}
24
24
  thread
25
25
  end
26
26
  def recipient_for(message)
@@ -31,7 +31,7 @@ module SocialButterfly
31
31
  if message && body
32
32
  message.comments.create(:author => self, :body => body)
33
33
  recip = recipient_for(message)
34
- (message.recipients - [recip].compact).each{|r| r.unread!}
34
+ (message.recipients - [recip].compact).each{|recipient| recipient.unread!}
35
35
  true
36
36
  else
37
37
  false
@@ -17,7 +17,7 @@ module SocialButterfly
17
17
  has_many :comments, :as => :commentable, :dependent => :destroy
18
18
  has_many :comment_participants, :through => :comments, :source => :author, :uniq => true
19
19
 
20
- named_scope :by_user, lambda {|u| u && {:conditions => ['author_id = ?', u.id]} || {}}
20
+ named_scope :by_user, lambda {|user| user && {:conditions => ['author_id = ?', user.id]} || {}}
21
21
 
22
22
  end
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acts_as_messenger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Nelson
@@ -58,8 +58,6 @@ files:
58
58
  - lib/acts_as_messenger/message.rb
59
59
  - lib/acts_as_messenger/thread.rb
60
60
  - spec/acts_as_messenger_spec.rb
61
- - spec/database.yml
62
- - spec/debug.log
63
61
  - spec/models/user.rb
64
62
  - spec/schema.rb
65
63
  - spec/spec.opts
data/spec/database.yml DELETED
@@ -1,7 +0,0 @@
1
- mysql:
2
- adapter: mysql
3
- encoding: utf8
4
- database: gem_test
5
- username: root
6
- password:
7
- pool: 5
data/spec/debug.log DELETED
@@ -1,2752 +0,0 @@
1
- # Logfile created on Mon Feb 01 22:36:08 -0500 2010 by /
2
- SQL (0.2ms) SET NAMES 'utf8'
3
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
4
- SQL (0.2ms) SET NAMES 'utf8'
5
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
6
- SQL (26.1ms) SHOW TABLES
7
- SQL (52.2ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
8
- SQL (176.0ms) CREATE INDEX `index_comments_on_author_id` ON `comments` (`author_id`)
9
- SQL (103.3ms) CREATE INDEX `index_comments_on_commentable_id_and_commentable_type` ON `comments` (`commentable_id`, `commentable_type`)
10
- SQL (0.6ms) SHOW TABLES
11
- SQL (97.7ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
12
- SQL (102.5ms) CREATE INDEX `index_message_threads_on_author_id` ON `message_threads` (`author_id`)
13
- SQL (119.3ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1)) ENGINE=InnoDB
14
- SQL (129.0ms) CREATE INDEX `index_recipients_on_message_thread_id` ON `recipients` (`message_thread_id`)
15
- SQL (121.5ms) CREATE INDEX `index_recipients_on_receiver_id_and_receiver_type` ON `recipients` (`receiver_id`, `receiver_type`)
16
- SQL (0.5ms) SHOW TABLES
17
- SQL (186.6ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
18
- SQL (0.9ms) SHOW TABLES
19
- SQL (1.9ms) SELECT version FROM `schema_migrations`
20
- User Columns (1.5ms) SHOW FIELDS FROM `users`
21
- SQL (0.1ms) BEGIN
22
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:36:21', '2010-02-01 22:36:21')
23
- SQL (0.6ms) COMMIT
24
- SQL (0.1ms) SET NAMES 'utf8'
25
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
26
- SQL (0.4ms) SHOW TABLES
27
- SQL (29.2ms) DROP TABLE `comments`
28
- SQL (54.9ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
29
- SQL (157.5ms) CREATE INDEX `index_comments_on_author_id` ON `comments` (`author_id`)
30
- SQL (123.3ms) CREATE INDEX `index_comments_on_commentable_id_and_commentable_type` ON `comments` (`commentable_id`, `commentable_type`)
31
- SQL (0.6ms) SHOW TABLES
32
- SQL (2.6ms) DROP TABLE `message_threads`
33
- SQL (105.5ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
34
- SQL (126.8ms) CREATE INDEX `index_message_threads_on_author_id` ON `message_threads` (`author_id`)
35
- SQL (0.0ms) Mysql::Error: Table 'recipients' already exists: CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1)) ENGINE=InnoDB
36
- SQL (0.2ms) SET NAMES 'utf8'
37
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
38
- SQL (0.4ms) SHOW TABLES
39
- SQL (1.7ms) DROP TABLE `comments`
40
- SQL (87.8ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
41
- SQL (1.2ms) SHOW TABLES
42
- SQL (1.9ms) DROP TABLE `message_threads`
43
- SQL (125.9ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
44
- SQL (0.7ms) SHOW TABLES
45
- SQL (2.6ms) DROP TABLE `recipients`
46
- SQL (117.8ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1)) ENGINE=InnoDB
47
- SQL (0.7ms) SHOW TABLES
48
- SQL (2.1ms) DROP TABLE `users`
49
- SQL (119.2ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
50
- SQL (0.8ms) SHOW TABLES
51
- SQL (0.3ms) SELECT version FROM `schema_migrations`
52
- User Columns (1.6ms) SHOW FIELDS FROM `users`
53
- SQL (0.1ms) BEGIN
54
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:38:35', '2010-02-01 22:38:35')
55
- SQL (0.6ms) COMMIT
56
- SQL (0.1ms) BEGIN
57
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:38:35', '2010-02-01 22:38:35')
58
- SQL (0.6ms) COMMIT
59
- SQL (0.2ms) SET NAMES 'utf8'
60
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
61
- SQL (0.4ms) SHOW TABLES
62
- SQL (1.7ms) DROP TABLE `comments`
63
- SQL (85.6ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
64
- SQL (0.8ms) SHOW TABLES
65
- SQL (2.5ms) DROP TABLE `message_threads`
66
- SQL (161.2ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
67
- SQL (0.7ms) SHOW TABLES
68
- SQL (2.3ms) DROP TABLE `recipients`
69
- SQL (117.6ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1)) ENGINE=InnoDB
70
- SQL (0.8ms) SHOW TABLES
71
- SQL (3.4ms) DROP TABLE `users`
72
- SQL (117.4ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
73
- SQL (0.8ms) SHOW TABLES
74
- SQL (0.5ms) SELECT version FROM `schema_migrations`
75
- User Columns (1.4ms) SHOW FIELDS FROM `users`
76
- SQL (0.4ms) BEGIN
77
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:43:29', '2010-02-01 22:43:29')
78
- SQL (0.6ms) COMMIT
79
- SQL (0.1ms) BEGIN
80
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:43:29', '2010-02-01 22:43:29')
81
- SQL (0.5ms) COMMIT
82
- MessageThread Columns (1.5ms) SHOW FIELDS FROM `message_threads`
83
- SQL (0.2ms) BEGIN
84
- MessageThread Create (0.3ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:43:29', 'message_title', 'message_body', '2010-02-01 22:43:29', 1, 1)
85
- SQL (1.2ms) COMMIT
86
- Recipient Columns (1.8ms) SHOW FIELDS FROM `recipients`
87
- SQL (0.2ms) BEGIN
88
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `receiver_id`, `has_read`, `message_thread_id`) VALUES('User', 2, NULL, 1)
89
- SQL (0.7ms) COMMIT
90
- Recipient Load (0.0ms) Mysql::Error: Unknown column 'created_at' in 'order clause': SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
91
- SQL (0.2ms) SET NAMES 'utf8'
92
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
93
- SQL (0.5ms) SHOW TABLES
94
- SQL (1.7ms) DROP TABLE `comments`
95
- SQL (78.2ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
96
- SQL (0.7ms) SHOW TABLES
97
- SQL (2.5ms) DROP TABLE `message_threads`
98
- SQL (148.9ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
99
- SQL (0.8ms) SHOW TABLES
100
- SQL (19.0ms) DROP TABLE `recipients`
101
- SQL (133.7ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
102
- SQL (0.7ms) SHOW TABLES
103
- SQL (2.8ms) DROP TABLE `users`
104
- SQL (118.2ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
105
- SQL (0.9ms) SHOW TABLES
106
- SQL (0.3ms) SELECT version FROM `schema_migrations`
107
- User Columns (1.6ms) SHOW FIELDS FROM `users`
108
- SQL (0.1ms) BEGIN
109
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:44:04', '2010-02-01 22:44:04')
110
- SQL (0.6ms) COMMIT
111
- SQL (0.1ms) BEGIN
112
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:44:04', '2010-02-01 22:44:04')
113
- SQL (0.6ms) COMMIT
114
- MessageThread Columns (1.3ms) SHOW FIELDS FROM `message_threads`
115
- SQL (0.1ms) BEGIN
116
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:44:04', 'message_title', 'message_body', '2010-02-01 22:44:04', 1, 1)
117
- SQL (0.7ms) COMMIT
118
- Recipient Columns (1.7ms) SHOW FIELDS FROM `recipients`
119
- SQL (0.1ms) BEGIN
120
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:44:04', 2, '2010-02-01 22:44:04', NULL, 1)
121
- SQL (0.9ms) COMMIT
122
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
123
- SQL (0.1ms) BEGIN
124
- SQL (0.1ms) COMMIT
125
- SQL (0.1ms) SET NAMES 'utf8'
126
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
127
- SQL (0.4ms) SHOW TABLES
128
- SQL (20.0ms) DROP TABLE `comments`
129
- SQL (120.6ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
130
- SQL (0.6ms) SHOW TABLES
131
- SQL (3.8ms) DROP TABLE `message_threads`
132
- SQL (396.4ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
133
- SQL (0.7ms) SHOW TABLES
134
- SQL (2.4ms) DROP TABLE `recipients`
135
- SQL (105.7ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
136
- SQL (1.1ms) SHOW TABLES
137
- SQL (2.9ms) DROP TABLE `users`
138
- SQL (131.4ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
139
- SQL (2.9ms) SHOW TABLES
140
- SQL (0.3ms) SELECT version FROM `schema_migrations`
141
- User Columns (1.6ms) SHOW FIELDS FROM `users`
142
- SQL (0.1ms) BEGIN
143
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:49:48', '2010-02-01 22:49:48')
144
- SQL (0.6ms) COMMIT
145
- SQL (0.1ms) BEGIN
146
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:49:48', '2010-02-01 22:49:48')
147
- SQL (0.5ms) COMMIT
148
- SQL (0.1ms) BEGIN
149
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:49:48', '2010-02-01 22:49:48')
150
- SQL (0.5ms) COMMIT
151
- SQL (0.2ms) BEGIN
152
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:49:48', '2010-02-01 22:49:48')
153
- SQL (0.7ms) COMMIT
154
- SQL (0.1ms) BEGIN
155
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:49:48', '2010-02-01 22:49:48')
156
- SQL (0.7ms) COMMIT
157
- SQL (0.1ms) BEGIN
158
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:49:48', '2010-02-01 22:49:48')
159
- SQL (0.5ms) COMMIT
160
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
161
- SQL (0.1ms) BEGIN
162
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:49:48', 'Title', 'Body', '2010-02-01 22:49:48', 1, 4)
163
- SQL (0.6ms) COMMIT
164
- Recipient Columns (1.4ms) SHOW FIELDS FROM `recipients`
165
- SQL (0.1ms) BEGIN
166
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:49:48', 5, '2010-02-01 22:49:48', NULL, 1)
167
- SQL (0.7ms) COMMIT
168
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
169
- SQL (0.1ms) BEGIN
170
- SQL (0.1ms) COMMIT
171
- SQL (0.2ms) SET NAMES 'utf8'
172
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
173
- SQL (0.4ms) SHOW TABLES
174
- SQL (26.2ms) DROP TABLE `comments`
175
- SQL (56.7ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
176
- SQL (0.6ms) SHOW TABLES
177
- SQL (2.1ms) DROP TABLE `message_threads`
178
- SQL (142.9ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
179
- SQL (0.7ms) SHOW TABLES
180
- SQL (2.0ms) DROP TABLE `recipients`
181
- SQL (107.7ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
182
- SQL (0.7ms) SHOW TABLES
183
- SQL (2.4ms) DROP TABLE `users`
184
- SQL (107.0ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
185
- SQL (0.8ms) SHOW TABLES
186
- SQL (0.7ms) SELECT version FROM `schema_migrations`
187
- User Columns (1.6ms) SHOW FIELDS FROM `users`
188
- SQL (0.5ms) BEGIN
189
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
190
- SQL (0.7ms) COMMIT
191
- SQL (0.1ms) BEGIN
192
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
193
- SQL (0.6ms) COMMIT
194
- SQL (0.1ms) BEGIN
195
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
196
- SQL (0.7ms) COMMIT
197
- SQL (0.1ms) BEGIN
198
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
199
- SQL (0.7ms) COMMIT
200
- SQL (0.1ms) BEGIN
201
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
202
- SQL (0.6ms) COMMIT
203
- SQL (0.1ms) BEGIN
204
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
205
- SQL (0.9ms) COMMIT
206
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
207
- SQL (0.1ms) BEGIN
208
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:52:18', 'Title', 'Body', '2010-02-01 22:52:18', 1, 4)
209
- SQL (0.8ms) COMMIT
210
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
211
- SQL (0.2ms) BEGIN
212
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:52:18', 5, '2010-02-01 22:52:18', NULL, 1)
213
- SQL (0.7ms) COMMIT
214
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
215
- SQL (0.1ms) BEGIN
216
- SQL (0.1ms) COMMIT
217
- SQL (0.2ms) BEGIN
218
- User Create (0.4ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
219
- SQL (0.6ms) COMMIT
220
- SQL (0.1ms) BEGIN
221
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
222
- SQL (0.4ms) COMMIT
223
- SQL (0.1ms) BEGIN
224
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:52:18', '2010-02-01 22:52:18')
225
- SQL (0.5ms) COMMIT
226
- SQL (0.1ms) BEGIN
227
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:52:18', 'Title 1', 'Body 1', '2010-02-01 22:52:18', 1, 7)
228
- SQL (0.6ms) COMMIT
229
- SQL (0.1ms) BEGIN
230
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:52:18', 8, '2010-02-01 22:52:18', NULL, 2)
231
- SQL (0.6ms) COMMIT
232
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
233
- SQL (0.1ms) BEGIN
234
- SQL (0.1ms) COMMIT
235
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
236
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
237
- SQL (0.1ms) BEGIN
238
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:52:18', 'Title 2', 'Body 2', '2010-02-01 22:52:18', 1, 8)
239
- SQL (0.7ms) COMMIT
240
- SQL (0.1ms) BEGIN
241
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:52:18', 7, '2010-02-01 22:52:18', NULL, 3)
242
- SQL (0.7ms) COMMIT
243
- SQL (0.1ms) BEGIN
244
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:52:18', 9, '2010-02-01 22:52:18', NULL, 3)
245
- SQL (0.6ms) COMMIT
246
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
247
- SQL (0.1ms) BEGIN
248
- SQL (0.1ms) COMMIT
249
- SQL (0.2ms) SET NAMES 'utf8'
250
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
251
- SQL (0.4ms) SHOW TABLES
252
- SQL (1.7ms) DROP TABLE `comments`
253
- SQL (90.5ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
254
- SQL (0.8ms) SHOW TABLES
255
- SQL (2.4ms) DROP TABLE `message_threads`
256
- SQL (149.9ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
257
- SQL (0.7ms) SHOW TABLES
258
- SQL (2.9ms) DROP TABLE `recipients`
259
- SQL (117.4ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
260
- SQL (0.7ms) SHOW TABLES
261
- SQL (2.6ms) DROP TABLE `users`
262
- SQL (118.3ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
263
- SQL (0.7ms) SHOW TABLES
264
- SQL (0.8ms) SELECT version FROM `schema_migrations`
265
- User Columns (1.7ms) SHOW FIELDS FROM `users`
266
- SQL (0.1ms) BEGIN
267
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
268
- SQL (0.7ms) COMMIT
269
- SQL (0.1ms) BEGIN
270
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
271
- SQL (0.7ms) COMMIT
272
- SQL (0.1ms) BEGIN
273
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
274
- SQL (0.5ms) COMMIT
275
- SQL (0.1ms) BEGIN
276
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
277
- SQL (0.5ms) COMMIT
278
- SQL (0.1ms) BEGIN
279
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
280
- SQL (0.5ms) COMMIT
281
- SQL (0.1ms) BEGIN
282
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
283
- SQL (0.9ms) COMMIT
284
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
285
- SQL (0.1ms) BEGIN
286
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:53:15', 'Title', 'Body', '2010-02-01 22:53:15', 1, 4)
287
- SQL (0.7ms) COMMIT
288
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
289
- SQL (0.1ms) BEGIN
290
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:53:15', 5, '2010-02-01 22:53:15', NULL, 1)
291
- SQL (1.1ms) COMMIT
292
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
293
- SQL (0.1ms) BEGIN
294
- SQL (0.1ms) COMMIT
295
- SQL (0.1ms) BEGIN
296
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
297
- SQL (0.7ms) COMMIT
298
- SQL (0.1ms) BEGIN
299
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
300
- SQL (0.6ms) COMMIT
301
- SQL (0.1ms) BEGIN
302
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 22:53:15', '2010-02-01 22:53:15')
303
- SQL (0.5ms) COMMIT
304
- SQL (0.1ms) BEGIN
305
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:53:15', 'Title 1', 'Body 1', '2010-02-01 22:53:15', 1, 7)
306
- SQL (0.6ms) COMMIT
307
- SQL (0.1ms) BEGIN
308
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:53:15', 8, '2010-02-01 22:53:15', NULL, 2)
309
- SQL (0.6ms) COMMIT
310
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
311
- SQL (0.1ms) BEGIN
312
- SQL (0.1ms) COMMIT
313
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
314
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
315
- SQL (0.1ms) BEGIN
316
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 22:53:15', 'Title 2', 'Body 2', '2010-02-01 22:53:15', 1, 8)
317
- SQL (0.7ms) COMMIT
318
- SQL (0.1ms) BEGIN
319
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:53:15', 7, '2010-02-01 22:53:15', NULL, 3)
320
- SQL (0.6ms) COMMIT
321
- SQL (0.1ms) BEGIN
322
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 22:53:15', 9, '2010-02-01 22:53:15', NULL, 3)
323
- SQL (0.6ms) COMMIT
324
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
325
- SQL (0.1ms) BEGIN
326
- SQL (0.1ms) COMMIT
327
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
328
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
329
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
330
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
331
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
332
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
333
- SQL (0.2ms) SET NAMES 'utf8'
334
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
335
- SQL (0.5ms) SHOW TABLES
336
- SQL (1.7ms) DROP TABLE `comments`
337
- SQL (113.8ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
338
- SQL (0.6ms) SHOW TABLES
339
- SQL (2.2ms) DROP TABLE `message_threads`
340
- SQL (387.8ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
341
- SQL (0.8ms) SHOW TABLES
342
- SQL (2.9ms) DROP TABLE `recipients`
343
- SQL (147.3ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
344
- SQL (1.9ms) SHOW TABLES
345
- SQL (1.9ms) DROP TABLE `users`
346
- SQL (155.6ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
347
- SQL (0.8ms) SHOW TABLES
348
- SQL (0.3ms) SELECT version FROM `schema_migrations`
349
- User Columns (1.6ms) SHOW FIELDS FROM `users`
350
- SQL (0.1ms) BEGIN
351
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
352
- SQL (0.5ms) COMMIT
353
- SQL (0.1ms) BEGIN
354
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
355
- SQL (1.3ms) COMMIT
356
- SQL (0.1ms) BEGIN
357
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
358
- SQL (0.6ms) COMMIT
359
- SQL (0.1ms) BEGIN
360
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
361
- SQL (0.7ms) COMMIT
362
- SQL (0.1ms) BEGIN
363
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
364
- SQL (0.6ms) COMMIT
365
- SQL (0.1ms) BEGIN
366
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
367
- SQL (1.0ms) COMMIT
368
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
369
- SQL (0.1ms) BEGIN
370
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:06:52', 'Title', 'Body', '2010-02-01 23:06:52', 1, 4)
371
- SQL (0.7ms) COMMIT
372
- Recipient Columns (1.3ms) SHOW FIELDS FROM `recipients`
373
- SQL (0.2ms) BEGIN
374
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:06:52', 5, '2010-02-01 23:06:52', NULL, 1)
375
- SQL (0.6ms) COMMIT
376
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
377
- SQL (0.1ms) BEGIN
378
- SQL (0.1ms) COMMIT
379
- SQL (0.3ms) BEGIN
380
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
381
- SQL (0.6ms) COMMIT
382
- SQL (0.1ms) BEGIN
383
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
384
- SQL (0.8ms) COMMIT
385
- SQL (0.1ms) BEGIN
386
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
387
- SQL (0.7ms) COMMIT
388
- SQL (0.1ms) BEGIN
389
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:06:52', 'Title 1', 'Body 1', '2010-02-01 23:06:52', 1, 7)
390
- SQL (0.6ms) COMMIT
391
- SQL (0.1ms) BEGIN
392
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:06:52', 8, '2010-02-01 23:06:52', NULL, 2)
393
- SQL (0.5ms) COMMIT
394
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
395
- SQL (0.1ms) BEGIN
396
- SQL (0.1ms) COMMIT
397
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
398
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
399
- SQL (0.1ms) BEGIN
400
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:06:52', 'Title 2', 'Body 2', '2010-02-01 23:06:52', 1, 8)
401
- SQL (0.6ms) COMMIT
402
- SQL (0.1ms) BEGIN
403
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:06:52', 7, '2010-02-01 23:06:52', NULL, 3)
404
- SQL (0.6ms) COMMIT
405
- SQL (0.1ms) BEGIN
406
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:06:52', 9, '2010-02-01 23:06:52', NULL, 3)
407
- SQL (0.7ms) COMMIT
408
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
409
- SQL (0.1ms) BEGIN
410
- SQL (0.1ms) COMMIT
411
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
412
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
413
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
414
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
415
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
416
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
417
- SQL (0.1ms) BEGIN
418
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
419
- SQL (0.7ms) COMMIT
420
- SQL (0.1ms) BEGIN
421
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
422
- SQL (0.6ms) COMMIT
423
- SQL (0.1ms) BEGIN
424
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:06:52', '2010-02-01 23:06:52')
425
- SQL (0.7ms) COMMIT
426
- SQL (0.1ms) BEGIN
427
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:06:52', 'Title 3', 'Body 3', '2010-02-01 23:06:52', 1, 10)
428
- SQL (0.6ms) COMMIT
429
- SQL (0.1ms) BEGIN
430
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:06:52', 11, '2010-02-01 23:06:52', NULL, 4)
431
- SQL (0.7ms) COMMIT
432
- SQL (0.1ms) BEGIN
433
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:06:52', 12, '2010-02-01 23:06:52', NULL, 4)
434
- SQL (0.7ms) COMMIT
435
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
436
- SQL (0.1ms) BEGIN
437
- SQL (0.1ms) COMMIT
438
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
439
- SQL (0.1ms) BEGIN
440
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:06:52', `has_read` = 1 WHERE `id` = 5
441
- SQL (0.7ms) COMMIT
442
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
443
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
444
- Comment Columns (1.6ms) SHOW FIELDS FROM `comments`
445
- SQL (0.1ms) BEGIN
446
- Comment Create (0.3ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:06:52', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:06:52', 12)
447
- SQL (0.5ms) COMMIT
448
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
449
- SQL (0.2ms) SET NAMES 'utf8'
450
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
451
- SQL (0.4ms) SHOW TABLES
452
- SQL (24.6ms) DROP TABLE `comments`
453
- SQL (63.7ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
454
- SQL (1.5ms) SHOW TABLES
455
- SQL (2.3ms) DROP TABLE `message_threads`
456
- SQL (166.6ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
457
- SQL (0.6ms) SHOW TABLES
458
- SQL (2.4ms) DROP TABLE `recipients`
459
- SQL (118.6ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
460
- SQL (1.4ms) SHOW TABLES
461
- SQL (2.0ms) DROP TABLE `users`
462
- SQL (118.6ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
463
- SQL (0.9ms) SHOW TABLES
464
- SQL (0.3ms) SELECT version FROM `schema_migrations`
465
- User Columns (1.6ms) SHOW FIELDS FROM `users`
466
- SQL (0.1ms) BEGIN
467
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
468
- SQL (0.7ms) COMMIT
469
- SQL (0.1ms) BEGIN
470
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
471
- SQL (0.5ms) COMMIT
472
- SQL (0.1ms) BEGIN
473
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
474
- SQL (0.7ms) COMMIT
475
- SQL (0.1ms) BEGIN
476
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
477
- SQL (0.7ms) COMMIT
478
- SQL (0.1ms) BEGIN
479
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
480
- SQL (0.6ms) COMMIT
481
- SQL (0.1ms) BEGIN
482
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
483
- SQL (1.0ms) COMMIT
484
- MessageThread Columns (1.5ms) SHOW FIELDS FROM `message_threads`
485
- SQL (0.1ms) BEGIN
486
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:08:32', 'Title', 'Body', '2010-02-01 23:08:32', 1, 4)
487
- SQL (0.8ms) COMMIT
488
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
489
- SQL (0.2ms) BEGIN
490
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:08:32', 5, '2010-02-01 23:08:32', NULL, 1)
491
- SQL (0.6ms) COMMIT
492
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
493
- SQL (0.1ms) BEGIN
494
- SQL (0.1ms) COMMIT
495
- SQL (0.1ms) BEGIN
496
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
497
- SQL (0.7ms) COMMIT
498
- SQL (0.1ms) BEGIN
499
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
500
- SQL (0.6ms) COMMIT
501
- SQL (0.1ms) BEGIN
502
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
503
- SQL (0.5ms) COMMIT
504
- SQL (0.1ms) BEGIN
505
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:08:32', 'Title 1', 'Body 1', '2010-02-01 23:08:32', 1, 7)
506
- SQL (0.6ms) COMMIT
507
- SQL (0.1ms) BEGIN
508
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:08:32', 8, '2010-02-01 23:08:32', NULL, 2)
509
- SQL (0.6ms) COMMIT
510
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
511
- SQL (0.1ms) BEGIN
512
- SQL (0.1ms) COMMIT
513
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
514
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
515
- SQL (0.1ms) BEGIN
516
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:08:32', 'Title 2', 'Body 2', '2010-02-01 23:08:32', 1, 8)
517
- SQL (0.5ms) COMMIT
518
- SQL (0.1ms) BEGIN
519
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:08:32', 7, '2010-02-01 23:08:32', NULL, 3)
520
- SQL (0.6ms) COMMIT
521
- SQL (0.1ms) BEGIN
522
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:08:32', 9, '2010-02-01 23:08:32', NULL, 3)
523
- SQL (0.7ms) COMMIT
524
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
525
- SQL (0.1ms) BEGIN
526
- SQL (0.1ms) COMMIT
527
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
528
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
529
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
530
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
531
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
532
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
533
- SQL (0.1ms) BEGIN
534
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
535
- SQL (1.2ms) COMMIT
536
- SQL (0.1ms) BEGIN
537
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
538
- SQL (0.8ms) COMMIT
539
- SQL (0.1ms) BEGIN
540
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:08:32', '2010-02-01 23:08:32')
541
- SQL (0.5ms) COMMIT
542
- SQL (0.1ms) BEGIN
543
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:08:32', 'Title 3', 'Body 3', '2010-02-01 23:08:32', 1, 10)
544
- SQL (0.7ms) COMMIT
545
- SQL (0.1ms) BEGIN
546
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:08:32', 11, '2010-02-01 23:08:32', NULL, 4)
547
- SQL (0.6ms) COMMIT
548
- SQL (0.1ms) BEGIN
549
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:08:32', 12, '2010-02-01 23:08:32', NULL, 4)
550
- SQL (0.7ms) COMMIT
551
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
552
- SQL (0.1ms) BEGIN
553
- SQL (0.1ms) COMMIT
554
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
555
- SQL (0.1ms) BEGIN
556
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:08:32', `has_read` = 1 WHERE `id` = 5
557
- SQL (0.7ms) COMMIT
558
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
559
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
560
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
561
- SQL (0.1ms) BEGIN
562
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:08:32', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:08:32', 12)
563
- SQL (0.7ms) COMMIT
564
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
565
- SQL (0.1ms) BEGIN
566
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:08:32', `has_read` = 0 WHERE `id` = 5
567
- SQL (0.4ms) COMMIT
568
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
569
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
570
- SQL (0.1ms) SET NAMES 'utf8'
571
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
572
- SQL (0.4ms) SHOW TABLES
573
- SQL (1.8ms) DROP TABLE `comments`
574
- SQL (90.3ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
575
- SQL (0.7ms) SHOW TABLES
576
- SQL (2.0ms) DROP TABLE `message_threads`
577
- SQL (153.7ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
578
- SQL (0.7ms) SHOW TABLES
579
- SQL (3.2ms) DROP TABLE `recipients`
580
- SQL (117.5ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
581
- SQL (0.7ms) SHOW TABLES
582
- SQL (2.1ms) DROP TABLE `users`
583
- SQL (107.9ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
584
- SQL (0.8ms) SHOW TABLES
585
- SQL (0.4ms) SELECT version FROM `schema_migrations`
586
- User Columns (1.6ms) SHOW FIELDS FROM `users`
587
- SQL (0.1ms) BEGIN
588
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
589
- SQL (0.6ms) COMMIT
590
- SQL (0.1ms) BEGIN
591
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
592
- SQL (0.5ms) COMMIT
593
- SQL (0.1ms) BEGIN
594
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
595
- SQL (0.5ms) COMMIT
596
- SQL (0.1ms) BEGIN
597
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
598
- SQL (0.7ms) COMMIT
599
- SQL (0.1ms) BEGIN
600
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
601
- SQL (0.7ms) COMMIT
602
- SQL (0.1ms) BEGIN
603
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
604
- SQL (0.6ms) COMMIT
605
- MessageThread Columns (1.4ms) SHOW FIELDS FROM `message_threads`
606
- SQL (0.1ms) BEGIN
607
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:10:23', 'Title', 'Body', '2010-02-01 23:10:23', 1, 4)
608
- SQL (0.7ms) COMMIT
609
- Recipient Columns (1.4ms) SHOW FIELDS FROM `recipients`
610
- SQL (0.1ms) BEGIN
611
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 5, '2010-02-01 23:10:23', NULL, 1)
612
- SQL (0.6ms) COMMIT
613
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
614
- SQL (0.1ms) BEGIN
615
- SQL (0.1ms) COMMIT
616
- SQL (0.1ms) BEGIN
617
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
618
- SQL (0.6ms) COMMIT
619
- SQL (0.1ms) BEGIN
620
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
621
- SQL (0.6ms) COMMIT
622
- SQL (0.1ms) BEGIN
623
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
624
- SQL (0.6ms) COMMIT
625
- SQL (0.1ms) BEGIN
626
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:10:23', 'Title 1', 'Body 1', '2010-02-01 23:10:23', 1, 7)
627
- SQL (0.6ms) COMMIT
628
- SQL (0.1ms) BEGIN
629
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 8, '2010-02-01 23:10:23', NULL, 2)
630
- SQL (0.6ms) COMMIT
631
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
632
- SQL (0.1ms) BEGIN
633
- SQL (0.1ms) COMMIT
634
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
635
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
636
- SQL (0.1ms) BEGIN
637
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:10:23', 'Title 2', 'Body 2', '2010-02-01 23:10:23', 1, 8)
638
- SQL (0.7ms) COMMIT
639
- SQL (0.1ms) BEGIN
640
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 7, '2010-02-01 23:10:23', NULL, 3)
641
- SQL (0.6ms) COMMIT
642
- SQL (0.1ms) BEGIN
643
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 9, '2010-02-01 23:10:23', NULL, 3)
644
- SQL (0.6ms) COMMIT
645
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
646
- SQL (0.1ms) BEGIN
647
- SQL (0.1ms) COMMIT
648
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
649
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
650
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
651
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
652
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
653
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
654
- SQL (0.1ms) BEGIN
655
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
656
- SQL (0.7ms) COMMIT
657
- SQL (0.1ms) BEGIN
658
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
659
- SQL (0.6ms) COMMIT
660
- SQL (0.1ms) BEGIN
661
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
662
- SQL (0.6ms) COMMIT
663
- SQL (0.1ms) BEGIN
664
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:10:23', 'Title 3', 'Body 3', '2010-02-01 23:10:23', 1, 10)
665
- SQL (0.6ms) COMMIT
666
- SQL (0.1ms) BEGIN
667
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 11, '2010-02-01 23:10:23', NULL, 4)
668
- SQL (0.5ms) COMMIT
669
- SQL (0.1ms) BEGIN
670
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 12, '2010-02-01 23:10:23', NULL, 4)
671
- SQL (0.8ms) COMMIT
672
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
673
- SQL (0.1ms) BEGIN
674
- SQL (0.1ms) COMMIT
675
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
676
- SQL (0.1ms) BEGIN
677
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:10:23', `has_read` = 1 WHERE `id` = 5
678
- SQL (1.1ms) COMMIT
679
- SQL (0.4ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
680
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
681
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
682
- SQL (0.1ms) BEGIN
683
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:10:23', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:10:23', 12)
684
- SQL (0.7ms) COMMIT
685
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
686
- SQL (0.1ms) BEGIN
687
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:10:23', `has_read` = 0 WHERE `id` = 5
688
- SQL (0.5ms) COMMIT
689
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
690
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
691
- SQL (0.1ms) BEGIN
692
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
693
- SQL (0.6ms) COMMIT
694
- SQL (0.1ms) BEGIN
695
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
696
- SQL (0.7ms) COMMIT
697
- SQL (0.1ms) BEGIN
698
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:10:23', '2010-02-01 23:10:23')
699
- SQL (0.6ms) COMMIT
700
- SQL (0.1ms) BEGIN
701
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:10:23', 'Title 4', 'Body 4', '2010-02-01 23:10:23', 1, 13)
702
- SQL (0.6ms) COMMIT
703
- SQL (0.1ms) BEGIN
704
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 14, '2010-02-01 23:10:23', NULL, 5)
705
- SQL (0.6ms) COMMIT
706
- SQL (0.1ms) BEGIN
707
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:10:23', 15, '2010-02-01 23:10:23', NULL, 5)
708
- SQL (0.7ms) COMMIT
709
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
710
- SQL (0.1ms) BEGIN
711
- SQL (0.1ms) COMMIT
712
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
713
- SQL (0.1ms) BEGIN
714
- Comment Load (0.3ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
715
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
716
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
717
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
718
- SQL (0.6ms) COMMIT
719
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
720
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
721
- SQL (0.1ms) SET NAMES 'utf8'
722
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
723
- SQL (0.5ms) SHOW TABLES
724
- SQL (1.9ms) DROP TABLE `comments`
725
- SQL (147.2ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
726
- SQL (0.7ms) SHOW TABLES
727
- SQL (2.1ms) DROP TABLE `message_threads`
728
- SQL (350.4ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
729
- SQL (3.9ms) SHOW TABLES
730
- SQL (3.0ms) DROP TABLE `recipients`
731
- SQL (126.0ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
732
- SQL (0.7ms) SHOW TABLES
733
- SQL (2.4ms) DROP TABLE `users`
734
- SQL (142.2ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
735
- SQL (4.0ms) SHOW TABLES
736
- SQL (1.6ms) SELECT version FROM `schema_migrations`
737
- User Columns (1.6ms) SHOW FIELDS FROM `users`
738
- SQL (0.1ms) BEGIN
739
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
740
- SQL (0.6ms) COMMIT
741
- SQL (0.1ms) BEGIN
742
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
743
- SQL (0.6ms) COMMIT
744
- SQL (0.1ms) BEGIN
745
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
746
- SQL (0.6ms) COMMIT
747
- SQL (0.1ms) BEGIN
748
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
749
- SQL (0.7ms) COMMIT
750
- SQL (0.1ms) BEGIN
751
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
752
- SQL (0.6ms) COMMIT
753
- SQL (0.1ms) BEGIN
754
- User Create (0.4ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
755
- SQL (0.6ms) COMMIT
756
- MessageThread Columns (1.4ms) SHOW FIELDS FROM `message_threads`
757
- SQL (0.1ms) BEGIN
758
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:11:57', 'Title', 'Body', '2010-02-01 23:11:57', 1, 4)
759
- SQL (0.8ms) COMMIT
760
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
761
- SQL (0.2ms) BEGIN
762
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 5, '2010-02-01 23:11:57', NULL, 1)
763
- SQL (0.7ms) COMMIT
764
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
765
- SQL (0.1ms) BEGIN
766
- SQL (0.1ms) COMMIT
767
- SQL (0.1ms) BEGIN
768
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
769
- SQL (0.7ms) COMMIT
770
- SQL (0.1ms) BEGIN
771
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
772
- SQL (0.6ms) COMMIT
773
- SQL (0.1ms) BEGIN
774
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
775
- SQL (0.6ms) COMMIT
776
- SQL (0.1ms) BEGIN
777
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:11:57', 'Title 1', 'Body 1', '2010-02-01 23:11:57', 1, 7)
778
- SQL (0.7ms) COMMIT
779
- SQL (0.1ms) BEGIN
780
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 8, '2010-02-01 23:11:57', NULL, 2)
781
- SQL (0.6ms) COMMIT
782
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
783
- SQL (0.1ms) BEGIN
784
- SQL (0.1ms) COMMIT
785
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
786
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
787
- SQL (0.1ms) BEGIN
788
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:11:57', 'Title 2', 'Body 2', '2010-02-01 23:11:57', 1, 8)
789
- SQL (0.7ms) COMMIT
790
- SQL (0.1ms) BEGIN
791
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 7, '2010-02-01 23:11:57', NULL, 3)
792
- SQL (0.6ms) COMMIT
793
- SQL (0.1ms) BEGIN
794
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 9, '2010-02-01 23:11:57', NULL, 3)
795
- SQL (0.6ms) COMMIT
796
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
797
- SQL (0.1ms) BEGIN
798
- SQL (0.1ms) COMMIT
799
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
800
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
801
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
802
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
803
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
804
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
805
- SQL (0.1ms) BEGIN
806
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
807
- SQL (0.6ms) COMMIT
808
- SQL (0.1ms) BEGIN
809
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
810
- SQL (0.8ms) COMMIT
811
- SQL (0.1ms) BEGIN
812
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
813
- SQL (0.6ms) COMMIT
814
- SQL (0.1ms) BEGIN
815
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:11:57', 'Title 3', 'Body 3', '2010-02-01 23:11:57', 1, 10)
816
- SQL (0.6ms) COMMIT
817
- SQL (0.1ms) BEGIN
818
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 11, '2010-02-01 23:11:57', NULL, 4)
819
- SQL (0.6ms) COMMIT
820
- SQL (0.1ms) BEGIN
821
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 12, '2010-02-01 23:11:57', NULL, 4)
822
- SQL (0.6ms) COMMIT
823
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
824
- SQL (0.1ms) BEGIN
825
- SQL (0.5ms) COMMIT
826
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
827
- SQL (0.1ms) BEGIN
828
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:11:57', `has_read` = 1 WHERE `id` = 5
829
- SQL (0.8ms) COMMIT
830
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
831
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
832
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
833
- SQL (0.1ms) BEGIN
834
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:11:57', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:11:57', 12)
835
- SQL (1.1ms) COMMIT
836
- Recipient Load (0.4ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
837
- SQL (0.1ms) BEGIN
838
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:11:57', `has_read` = 0 WHERE `id` = 5
839
- SQL (0.6ms) COMMIT
840
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
841
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
842
- SQL (0.1ms) BEGIN
843
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
844
- SQL (0.6ms) COMMIT
845
- SQL (0.1ms) BEGIN
846
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
847
- SQL (0.5ms) COMMIT
848
- SQL (0.1ms) BEGIN
849
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
850
- SQL (0.6ms) COMMIT
851
- SQL (0.1ms) BEGIN
852
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:11:57', 'Title 4', 'Body 4', '2010-02-01 23:11:57', 1, 13)
853
- SQL (0.7ms) COMMIT
854
- SQL (0.1ms) BEGIN
855
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 14, '2010-02-01 23:11:57', NULL, 5)
856
- SQL (0.6ms) COMMIT
857
- SQL (0.1ms) BEGIN
858
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:57', 15, '2010-02-01 23:11:57', NULL, 5)
859
- SQL (0.6ms) COMMIT
860
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
861
- SQL (0.1ms) BEGIN
862
- SQL (0.1ms) COMMIT
863
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
864
- SQL (0.1ms) BEGIN
865
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
866
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
867
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 8
868
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
869
- SQL (0.7ms) COMMIT
870
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
871
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
872
- SQL (0.1ms) BEGIN
873
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
874
- SQL (0.6ms) COMMIT
875
- SQL (0.1ms) BEGIN
876
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:11:57', '2010-02-01 23:11:57')
877
- SQL (0.5ms) COMMIT
878
- SQL (0.1ms) BEGIN
879
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:11:58', '2010-02-01 23:11:58')
880
- SQL (0.7ms) COMMIT
881
- SQL (0.1ms) BEGIN
882
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:11:58', 'Title 5', 'Body 5', '2010-02-01 23:11:58', 1, 16)
883
- SQL (0.7ms) COMMIT
884
- SQL (0.1ms) BEGIN
885
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:58', 17, '2010-02-01 23:11:58', NULL, 6)
886
- SQL (0.7ms) COMMIT
887
- SQL (0.1ms) BEGIN
888
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:11:58', 18, '2010-02-01 23:11:58', NULL, 6)
889
- SQL (0.6ms) COMMIT
890
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
891
- SQL (0.1ms) BEGIN
892
- SQL (0.1ms) COMMIT
893
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
894
- SQL (0.1ms) SET NAMES 'utf8'
895
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
896
- SQL (0.4ms) SHOW TABLES
897
- SQL (1.9ms) DROP TABLE `comments`
898
- SQL (82.5ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
899
- SQL (1.0ms) SHOW TABLES
900
- SQL (2.6ms) DROP TABLE `message_threads`
901
- SQL (186.4ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
902
- SQL (0.7ms) SHOW TABLES
903
- SQL (3.1ms) DROP TABLE `recipients`
904
- SQL (114.3ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
905
- SQL (0.8ms) SHOW TABLES
906
- SQL (2.6ms) DROP TABLE `users`
907
- SQL (129.9ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
908
- SQL (1.0ms) SHOW TABLES
909
- SQL (0.7ms) SELECT version FROM `schema_migrations`
910
- User Columns (1.6ms) SHOW FIELDS FROM `users`
911
- SQL (0.1ms) BEGIN
912
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:12', '2010-02-01 23:12:12')
913
- SQL (0.6ms) COMMIT
914
- SQL (0.1ms) BEGIN
915
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:12', '2010-02-01 23:12:12')
916
- SQL (0.8ms) COMMIT
917
- SQL (0.1ms) BEGIN
918
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:12', '2010-02-01 23:12:12')
919
- SQL (0.5ms) COMMIT
920
- SQL (0.1ms) BEGIN
921
- User Create (0.4ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
922
- SQL (0.8ms) COMMIT
923
- SQL (0.1ms) BEGIN
924
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
925
- SQL (0.6ms) COMMIT
926
- SQL (0.1ms) BEGIN
927
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
928
- SQL (0.7ms) COMMIT
929
- MessageThread Columns (1.5ms) SHOW FIELDS FROM `message_threads`
930
- SQL (0.1ms) BEGIN
931
- MessageThread Create (0.3ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:13', 'Title', 'Body', '2010-02-01 23:12:13', 1, 4)
932
- SQL (0.6ms) COMMIT
933
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
934
- SQL (0.2ms) BEGIN
935
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 5, '2010-02-01 23:12:13', NULL, 1)
936
- SQL (0.7ms) COMMIT
937
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
938
- SQL (0.1ms) BEGIN
939
- SQL (0.1ms) COMMIT
940
- SQL (0.1ms) BEGIN
941
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
942
- SQL (0.7ms) COMMIT
943
- SQL (0.1ms) BEGIN
944
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
945
- SQL (0.6ms) COMMIT
946
- SQL (0.1ms) BEGIN
947
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
948
- SQL (0.6ms) COMMIT
949
- SQL (0.1ms) BEGIN
950
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:13', 'Title 1', 'Body 1', '2010-02-01 23:12:13', 1, 7)
951
- SQL (0.7ms) COMMIT
952
- SQL (0.1ms) BEGIN
953
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 8, '2010-02-01 23:12:13', NULL, 2)
954
- SQL (0.5ms) COMMIT
955
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
956
- SQL (0.1ms) BEGIN
957
- SQL (0.1ms) COMMIT
958
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
959
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
960
- SQL (0.1ms) BEGIN
961
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:13', 'Title 2', 'Body 2', '2010-02-01 23:12:13', 1, 8)
962
- SQL (0.5ms) COMMIT
963
- SQL (0.1ms) BEGIN
964
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 7, '2010-02-01 23:12:13', NULL, 3)
965
- SQL (0.7ms) COMMIT
966
- SQL (0.1ms) BEGIN
967
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 9, '2010-02-01 23:12:13', NULL, 3)
968
- SQL (0.6ms) COMMIT
969
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
970
- SQL (0.1ms) BEGIN
971
- SQL (0.1ms) COMMIT
972
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
973
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
974
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
975
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
976
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
977
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
978
- SQL (0.1ms) BEGIN
979
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
980
- SQL (0.6ms) COMMIT
981
- SQL (0.1ms) BEGIN
982
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
983
- SQL (0.5ms) COMMIT
984
- SQL (0.1ms) BEGIN
985
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
986
- SQL (0.6ms) COMMIT
987
- SQL (0.1ms) BEGIN
988
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:13', 'Title 3', 'Body 3', '2010-02-01 23:12:13', 1, 10)
989
- SQL (0.6ms) COMMIT
990
- SQL (0.1ms) BEGIN
991
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 11, '2010-02-01 23:12:13', NULL, 4)
992
- SQL (0.5ms) COMMIT
993
- SQL (0.1ms) BEGIN
994
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 12, '2010-02-01 23:12:13', NULL, 4)
995
- SQL (0.5ms) COMMIT
996
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
997
- SQL (0.1ms) BEGIN
998
- SQL (0.1ms) COMMIT
999
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1000
- SQL (0.1ms) BEGIN
1001
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:12:13', `has_read` = 1 WHERE `id` = 5
1002
- SQL (0.7ms) COMMIT
1003
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1004
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1005
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
1006
- SQL (0.1ms) BEGIN
1007
- Comment Create (0.3ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:12:13', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:12:13', 12)
1008
- SQL (0.7ms) COMMIT
1009
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1010
- SQL (0.1ms) BEGIN
1011
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:12:13', `has_read` = 0 WHERE `id` = 5
1012
- SQL (0.5ms) COMMIT
1013
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1014
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1015
- SQL (0.1ms) BEGIN
1016
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
1017
- SQL (0.7ms) COMMIT
1018
- SQL (0.1ms) BEGIN
1019
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
1020
- SQL (0.6ms) COMMIT
1021
- SQL (0.1ms) BEGIN
1022
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
1023
- SQL (0.6ms) COMMIT
1024
- SQL (0.1ms) BEGIN
1025
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:13', 'Title 4', 'Body 4', '2010-02-01 23:12:13', 1, 13)
1026
- SQL (0.7ms) COMMIT
1027
- SQL (0.1ms) BEGIN
1028
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 14, '2010-02-01 23:12:13', NULL, 5)
1029
- SQL (0.7ms) COMMIT
1030
- SQL (0.1ms) BEGIN
1031
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 15, '2010-02-01 23:12:13', NULL, 5)
1032
- SQL (0.6ms) COMMIT
1033
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
1034
- SQL (0.1ms) BEGIN
1035
- SQL (0.1ms) COMMIT
1036
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1037
- SQL (0.1ms) BEGIN
1038
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
1039
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
1040
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
1041
- MessageThread Destroy (0.2ms) DELETE FROM `message_threads` WHERE `id` = 5
1042
- SQL (0.6ms) COMMIT
1043
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1044
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
1045
- SQL (0.1ms) BEGIN
1046
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
1047
- SQL (0.5ms) COMMIT
1048
- SQL (0.1ms) BEGIN
1049
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
1050
- SQL (0.7ms) COMMIT
1051
- SQL (0.1ms) BEGIN
1052
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:13', '2010-02-01 23:12:13')
1053
- SQL (0.6ms) COMMIT
1054
- SQL (0.1ms) BEGIN
1055
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:13', 'Title 5', 'Body 5', '2010-02-01 23:12:13', 1, 16)
1056
- SQL (0.6ms) COMMIT
1057
- SQL (0.1ms) BEGIN
1058
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 17, '2010-02-01 23:12:13', NULL, 6)
1059
- SQL (0.7ms) COMMIT
1060
- SQL (0.1ms) BEGIN
1061
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:13', 18, '2010-02-01 23:12:13', NULL, 6)
1062
- SQL (0.7ms) COMMIT
1063
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1064
- SQL (0.1ms) BEGIN
1065
- SQL (0.1ms) COMMIT
1066
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1067
- SQL (0.1ms) SET NAMES 'utf8'
1068
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
1069
- SQL (0.4ms) SHOW TABLES
1070
- SQL (2.3ms) DROP TABLE `comments`
1071
- SQL (86.2ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1072
- SQL (0.7ms) SHOW TABLES
1073
- SQL (2.6ms) DROP TABLE `message_threads`
1074
- SQL (153.5ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1075
- SQL (0.8ms) SHOW TABLES
1076
- SQL (2.9ms) DROP TABLE `recipients`
1077
- SQL (128.3ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1078
- SQL (0.7ms) SHOW TABLES
1079
- SQL (2.9ms) DROP TABLE `users`
1080
- SQL (146.4ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1081
- SQL (0.9ms) SHOW TABLES
1082
- SQL (0.3ms) SELECT version FROM `schema_migrations`
1083
- User Columns (1.5ms) SHOW FIELDS FROM `users`
1084
- SQL (0.1ms) BEGIN
1085
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1086
- SQL (0.5ms) COMMIT
1087
- SQL (0.1ms) BEGIN
1088
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1089
- SQL (0.6ms) COMMIT
1090
- SQL (0.1ms) BEGIN
1091
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1092
- SQL (0.5ms) COMMIT
1093
- SQL (0.1ms) BEGIN
1094
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1095
- SQL (0.6ms) COMMIT
1096
- SQL (0.1ms) BEGIN
1097
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1098
- SQL (0.6ms) COMMIT
1099
- SQL (0.1ms) BEGIN
1100
- User Create (0.5ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1101
- SQL (0.7ms) COMMIT
1102
- MessageThread Columns (1.4ms) SHOW FIELDS FROM `message_threads`
1103
- SQL (0.1ms) BEGIN
1104
- MessageThread Create (0.3ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:55', 'Title', 'Body', '2010-02-01 23:12:55', 1, 4)
1105
- SQL (0.7ms) COMMIT
1106
- Recipient Columns (1.3ms) SHOW FIELDS FROM `recipients`
1107
- SQL (0.1ms) BEGIN
1108
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 5, '2010-02-01 23:12:55', NULL, 1)
1109
- SQL (0.6ms) COMMIT
1110
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
1111
- SQL (0.1ms) BEGIN
1112
- SQL (0.1ms) COMMIT
1113
- SQL (0.1ms) BEGIN
1114
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1115
- SQL (0.5ms) COMMIT
1116
- SQL (0.1ms) BEGIN
1117
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1118
- SQL (0.5ms) COMMIT
1119
- SQL (0.1ms) BEGIN
1120
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1121
- SQL (0.6ms) COMMIT
1122
- SQL (0.1ms) BEGIN
1123
- MessageThread Create (0.3ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:55', 'Title 1', 'Body 1', '2010-02-01 23:12:55', 1, 7)
1124
- SQL (0.6ms) COMMIT
1125
- SQL (0.1ms) BEGIN
1126
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 8, '2010-02-01 23:12:55', NULL, 2)
1127
- SQL (0.5ms) COMMIT
1128
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
1129
- SQL (0.1ms) BEGIN
1130
- SQL (0.1ms) COMMIT
1131
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1132
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1133
- SQL (0.1ms) BEGIN
1134
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:55', 'Title 2', 'Body 2', '2010-02-01 23:12:55', 1, 8)
1135
- SQL (0.6ms) COMMIT
1136
- SQL (0.1ms) BEGIN
1137
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 7, '2010-02-01 23:12:55', NULL, 3)
1138
- SQL (0.7ms) COMMIT
1139
- SQL (0.1ms) BEGIN
1140
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 9, '2010-02-01 23:12:55', NULL, 3)
1141
- SQL (0.7ms) COMMIT
1142
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
1143
- SQL (0.1ms) BEGIN
1144
- SQL (0.1ms) COMMIT
1145
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
1146
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
1147
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
1148
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1149
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1150
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
1151
- SQL (0.1ms) BEGIN
1152
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1153
- SQL (0.7ms) COMMIT
1154
- SQL (0.1ms) BEGIN
1155
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1156
- SQL (0.6ms) COMMIT
1157
- SQL (0.1ms) BEGIN
1158
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1159
- SQL (0.7ms) COMMIT
1160
- SQL (0.1ms) BEGIN
1161
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:55', 'Title 3', 'Body 3', '2010-02-01 23:12:55', 1, 10)
1162
- SQL (0.6ms) COMMIT
1163
- SQL (0.1ms) BEGIN
1164
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 11, '2010-02-01 23:12:55', NULL, 4)
1165
- SQL (0.6ms) COMMIT
1166
- SQL (0.1ms) BEGIN
1167
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 12, '2010-02-01 23:12:55', NULL, 4)
1168
- SQL (0.6ms) COMMIT
1169
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
1170
- SQL (0.1ms) BEGIN
1171
- SQL (0.1ms) COMMIT
1172
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1173
- SQL (0.1ms) BEGIN
1174
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:12:55', `has_read` = 1 WHERE `id` = 5
1175
- SQL (0.7ms) COMMIT
1176
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1177
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1178
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
1179
- SQL (0.1ms) BEGIN
1180
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:12:55', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:12:55', 12)
1181
- SQL (0.7ms) COMMIT
1182
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1183
- SQL (0.1ms) BEGIN
1184
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:12:55', `has_read` = 0 WHERE `id` = 5
1185
- SQL (0.6ms) COMMIT
1186
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1187
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1188
- SQL (0.1ms) BEGIN
1189
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1190
- SQL (0.6ms) COMMIT
1191
- SQL (0.1ms) BEGIN
1192
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1193
- SQL (0.5ms) COMMIT
1194
- SQL (0.1ms) BEGIN
1195
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1196
- SQL (0.6ms) COMMIT
1197
- SQL (0.1ms) BEGIN
1198
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:55', 'Title 4', 'Body 4', '2010-02-01 23:12:55', 1, 13)
1199
- SQL (0.6ms) COMMIT
1200
- SQL (0.1ms) BEGIN
1201
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 14, '2010-02-01 23:12:55', NULL, 5)
1202
- SQL (0.6ms) COMMIT
1203
- SQL (0.1ms) BEGIN
1204
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 15, '2010-02-01 23:12:55', NULL, 5)
1205
- SQL (0.6ms) COMMIT
1206
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
1207
- SQL (0.1ms) BEGIN
1208
- SQL (0.1ms) COMMIT
1209
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1210
- SQL (0.1ms) BEGIN
1211
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
1212
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
1213
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
1214
- MessageThread Destroy (0.2ms) DELETE FROM `message_threads` WHERE `id` = 5
1215
- SQL (0.6ms) COMMIT
1216
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1217
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
1218
- SQL (0.1ms) BEGIN
1219
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1220
- SQL (0.7ms) COMMIT
1221
- SQL (0.1ms) BEGIN
1222
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1223
- SQL (0.6ms) COMMIT
1224
- SQL (0.1ms) BEGIN
1225
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:12:55', '2010-02-01 23:12:55')
1226
- SQL (0.6ms) COMMIT
1227
- SQL (0.1ms) BEGIN
1228
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:12:55', 'Title 5', 'Body 5', '2010-02-01 23:12:55', 1, 16)
1229
- SQL (0.6ms) COMMIT
1230
- SQL (0.1ms) BEGIN
1231
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 17, '2010-02-01 23:12:55', NULL, 6)
1232
- SQL (0.6ms) COMMIT
1233
- SQL (0.1ms) BEGIN
1234
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:12:55', 18, '2010-02-01 23:12:55', NULL, 6)
1235
- SQL (0.7ms) COMMIT
1236
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1237
- SQL (0.1ms) BEGIN
1238
- SQL (0.1ms) COMMIT
1239
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1240
- SQL (0.1ms) BEGIN
1241
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:12:55', 'MessageThread', 'Test', 6, '2010-02-01 23:12:55', 17)
1242
- SQL (0.7ms) COMMIT
1243
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1244
- SQL (0.1ms) BEGIN
1245
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:12:55', `has_read` = 0 WHERE `id` = 10
1246
- SQL (0.7ms) COMMIT
1247
- SQL (0.1ms) SET NAMES 'utf8'
1248
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
1249
- SQL (0.4ms) SHOW TABLES
1250
- SQL (1.9ms) DROP TABLE `comments`
1251
- SQL (78.3ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1252
- SQL (0.7ms) SHOW TABLES
1253
- SQL (3.3ms) DROP TABLE `message_threads`
1254
- SQL (140.6ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1255
- SQL (1.0ms) SHOW TABLES
1256
- SQL (2.4ms) DROP TABLE `recipients`
1257
- SQL (117.2ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1258
- SQL (0.7ms) SHOW TABLES
1259
- SQL (2.8ms) DROP TABLE `users`
1260
- SQL (117.8ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1261
- SQL (0.9ms) SHOW TABLES
1262
- SQL (0.3ms) SELECT version FROM `schema_migrations`
1263
- User Columns (1.6ms) SHOW FIELDS FROM `users`
1264
- SQL (0.1ms) BEGIN
1265
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:18', '2010-02-01 23:13:18')
1266
- SQL (0.7ms) COMMIT
1267
- SQL (0.1ms) BEGIN
1268
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:18', '2010-02-01 23:13:18')
1269
- SQL (0.6ms) COMMIT
1270
- SQL (0.1ms) BEGIN
1271
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1272
- SQL (0.8ms) COMMIT
1273
- SQL (0.1ms) BEGIN
1274
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1275
- SQL (0.7ms) COMMIT
1276
- SQL (0.1ms) BEGIN
1277
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1278
- SQL (0.7ms) COMMIT
1279
- SQL (0.1ms) BEGIN
1280
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1281
- SQL (0.7ms) COMMIT
1282
- MessageThread Columns (1.4ms) SHOW FIELDS FROM `message_threads`
1283
- SQL (0.1ms) BEGIN
1284
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:19', 'Title', 'Body', '2010-02-01 23:13:19', 1, 4)
1285
- SQL (0.7ms) COMMIT
1286
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
1287
- SQL (0.1ms) BEGIN
1288
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 5, '2010-02-01 23:13:19', NULL, 1)
1289
- SQL (0.7ms) COMMIT
1290
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
1291
- SQL (0.1ms) BEGIN
1292
- SQL (0.1ms) COMMIT
1293
- SQL (0.1ms) BEGIN
1294
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1295
- SQL (0.6ms) COMMIT
1296
- SQL (0.1ms) BEGIN
1297
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1298
- SQL (0.6ms) COMMIT
1299
- SQL (0.1ms) BEGIN
1300
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1301
- SQL (0.7ms) COMMIT
1302
- SQL (0.1ms) BEGIN
1303
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:19', 'Title 1', 'Body 1', '2010-02-01 23:13:19', 1, 7)
1304
- SQL (0.6ms) COMMIT
1305
- SQL (0.1ms) BEGIN
1306
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 8, '2010-02-01 23:13:19', NULL, 2)
1307
- SQL (0.7ms) COMMIT
1308
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
1309
- SQL (0.1ms) BEGIN
1310
- SQL (0.1ms) COMMIT
1311
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1312
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1313
- SQL (0.1ms) BEGIN
1314
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:19', 'Title 2', 'Body 2', '2010-02-01 23:13:19', 1, 8)
1315
- SQL (0.7ms) COMMIT
1316
- SQL (0.1ms) BEGIN
1317
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 7, '2010-02-01 23:13:19', NULL, 3)
1318
- SQL (0.6ms) COMMIT
1319
- SQL (0.1ms) BEGIN
1320
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 9, '2010-02-01 23:13:19', NULL, 3)
1321
- SQL (0.6ms) COMMIT
1322
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
1323
- SQL (0.1ms) BEGIN
1324
- SQL (0.1ms) COMMIT
1325
- User Load (0.3ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
1326
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
1327
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
1328
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1329
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1330
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
1331
- SQL (0.1ms) BEGIN
1332
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1333
- SQL (0.6ms) COMMIT
1334
- SQL (0.1ms) BEGIN
1335
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1336
- SQL (0.7ms) COMMIT
1337
- SQL (0.1ms) BEGIN
1338
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1339
- SQL (0.6ms) COMMIT
1340
- SQL (0.1ms) BEGIN
1341
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:19', 'Title 3', 'Body 3', '2010-02-01 23:13:19', 1, 10)
1342
- SQL (0.5ms) COMMIT
1343
- SQL (0.1ms) BEGIN
1344
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 11, '2010-02-01 23:13:19', NULL, 4)
1345
- SQL (0.6ms) COMMIT
1346
- SQL (0.1ms) BEGIN
1347
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 12, '2010-02-01 23:13:19', NULL, 4)
1348
- SQL (0.7ms) COMMIT
1349
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
1350
- SQL (0.1ms) BEGIN
1351
- SQL (0.1ms) COMMIT
1352
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1353
- SQL (0.1ms) BEGIN
1354
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:19', `has_read` = 1 WHERE `id` = 5
1355
- SQL (0.5ms) COMMIT
1356
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1357
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1358
- Comment Columns (1.6ms) SHOW FIELDS FROM `comments`
1359
- SQL (0.1ms) BEGIN
1360
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:13:19', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:13:19', 12)
1361
- SQL (0.7ms) COMMIT
1362
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1363
- SQL (0.1ms) BEGIN
1364
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:19', `has_read` = 0 WHERE `id` = 5
1365
- SQL (0.6ms) COMMIT
1366
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1367
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1368
- SQL (0.1ms) BEGIN
1369
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1370
- SQL (0.7ms) COMMIT
1371
- SQL (0.1ms) BEGIN
1372
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1373
- SQL (0.7ms) COMMIT
1374
- SQL (0.1ms) BEGIN
1375
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1376
- SQL (0.5ms) COMMIT
1377
- SQL (0.1ms) BEGIN
1378
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:19', 'Title 4', 'Body 4', '2010-02-01 23:13:19', 1, 13)
1379
- SQL (0.5ms) COMMIT
1380
- SQL (0.1ms) BEGIN
1381
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 14, '2010-02-01 23:13:19', NULL, 5)
1382
- SQL (0.6ms) COMMIT
1383
- SQL (0.1ms) BEGIN
1384
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 15, '2010-02-01 23:13:19', NULL, 5)
1385
- SQL (0.5ms) COMMIT
1386
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
1387
- SQL (0.1ms) BEGIN
1388
- SQL (0.1ms) COMMIT
1389
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1390
- SQL (0.1ms) BEGIN
1391
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
1392
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
1393
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
1394
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
1395
- SQL (0.7ms) COMMIT
1396
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1397
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
1398
- SQL (0.1ms) BEGIN
1399
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1400
- SQL (0.6ms) COMMIT
1401
- SQL (0.1ms) BEGIN
1402
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1403
- SQL (0.6ms) COMMIT
1404
- SQL (0.1ms) BEGIN
1405
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:19', '2010-02-01 23:13:19')
1406
- SQL (0.5ms) COMMIT
1407
- SQL (0.1ms) BEGIN
1408
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:19', 'Title 5', 'Body 5', '2010-02-01 23:13:19', 1, 16)
1409
- SQL (0.6ms) COMMIT
1410
- SQL (0.1ms) BEGIN
1411
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 17, '2010-02-01 23:13:19', NULL, 6)
1412
- SQL (0.6ms) COMMIT
1413
- SQL (0.1ms) BEGIN
1414
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:19', 18, '2010-02-01 23:13:19', NULL, 6)
1415
- SQL (0.6ms) COMMIT
1416
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1417
- SQL (0.1ms) BEGIN
1418
- SQL (0.1ms) COMMIT
1419
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1420
- SQL (0.1ms) BEGIN
1421
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:13:19', 'MessageThread', 'Test', 6, '2010-02-01 23:13:19', 17)
1422
- SQL (0.8ms) COMMIT
1423
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1424
- SQL (0.1ms) BEGIN
1425
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:19', `has_read` = 0 WHERE `id` = 10
1426
- SQL (0.7ms) COMMIT
1427
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
1428
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
1429
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1430
- SQL (0.2ms) SET NAMES 'utf8'
1431
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
1432
- SQL (0.4ms) SHOW TABLES
1433
- SQL (1.9ms) DROP TABLE `comments`
1434
- SQL (110.4ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1435
- SQL (1.1ms) SHOW TABLES
1436
- SQL (3.3ms) DROP TABLE `message_threads`
1437
- SQL (196.8ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1438
- SQL (0.7ms) SHOW TABLES
1439
- SQL (2.5ms) DROP TABLE `recipients`
1440
- SQL (108.4ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1441
- SQL (0.9ms) SHOW TABLES
1442
- SQL (2.1ms) DROP TABLE `users`
1443
- SQL (107.1ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1444
- SQL (1.6ms) SHOW TABLES
1445
- SQL (0.4ms) SELECT version FROM `schema_migrations`
1446
- User Columns (1.6ms) SHOW FIELDS FROM `users`
1447
- SQL (0.1ms) BEGIN
1448
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1449
- SQL (0.7ms) COMMIT
1450
- SQL (0.1ms) BEGIN
1451
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1452
- SQL (0.6ms) COMMIT
1453
- SQL (0.1ms) BEGIN
1454
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1455
- SQL (1.2ms) COMMIT
1456
- SQL (0.1ms) BEGIN
1457
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1458
- SQL (0.6ms) COMMIT
1459
- SQL (0.1ms) BEGIN
1460
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1461
- SQL (0.6ms) COMMIT
1462
- SQL (0.1ms) BEGIN
1463
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1464
- SQL (0.8ms) COMMIT
1465
- MessageThread Columns (1.5ms) SHOW FIELDS FROM `message_threads`
1466
- SQL (0.1ms) BEGIN
1467
- MessageThread Create (0.3ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:52', 'Title', 'Body', '2010-02-01 23:13:52', 1, 4)
1468
- SQL (0.8ms) COMMIT
1469
- Recipient Columns (1.4ms) SHOW FIELDS FROM `recipients`
1470
- SQL (0.1ms) BEGIN
1471
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 5, '2010-02-01 23:13:52', NULL, 1)
1472
- SQL (0.7ms) COMMIT
1473
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
1474
- SQL (0.1ms) BEGIN
1475
- SQL (0.1ms) COMMIT
1476
- SQL (0.1ms) BEGIN
1477
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1478
- SQL (0.7ms) COMMIT
1479
- SQL (0.1ms) BEGIN
1480
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1481
- SQL (0.5ms) COMMIT
1482
- SQL (0.1ms) BEGIN
1483
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1484
- SQL (0.7ms) COMMIT
1485
- SQL (0.1ms) BEGIN
1486
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:52', 'Title 1', 'Body 1', '2010-02-01 23:13:52', 1, 7)
1487
- SQL (0.5ms) COMMIT
1488
- SQL (0.1ms) BEGIN
1489
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 8, '2010-02-01 23:13:52', NULL, 2)
1490
- SQL (0.6ms) COMMIT
1491
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
1492
- SQL (0.1ms) BEGIN
1493
- SQL (0.1ms) COMMIT
1494
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1495
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1496
- SQL (0.1ms) BEGIN
1497
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:52', 'Title 2', 'Body 2', '2010-02-01 23:13:52', 1, 8)
1498
- SQL (0.7ms) COMMIT
1499
- SQL (0.1ms) BEGIN
1500
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 7, '2010-02-01 23:13:52', NULL, 3)
1501
- SQL (0.7ms) COMMIT
1502
- SQL (0.1ms) BEGIN
1503
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 9, '2010-02-01 23:13:52', NULL, 3)
1504
- SQL (0.6ms) COMMIT
1505
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
1506
- SQL (0.1ms) BEGIN
1507
- SQL (0.1ms) COMMIT
1508
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
1509
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
1510
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
1511
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1512
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1513
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
1514
- SQL (0.1ms) BEGIN
1515
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1516
- SQL (0.7ms) COMMIT
1517
- SQL (0.1ms) BEGIN
1518
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1519
- SQL (0.5ms) COMMIT
1520
- SQL (0.1ms) BEGIN
1521
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1522
- SQL (0.6ms) COMMIT
1523
- SQL (0.1ms) BEGIN
1524
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:52', 'Title 3', 'Body 3', '2010-02-01 23:13:52', 1, 10)
1525
- SQL (0.6ms) COMMIT
1526
- SQL (0.1ms) BEGIN
1527
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 11, '2010-02-01 23:13:52', NULL, 4)
1528
- SQL (0.7ms) COMMIT
1529
- SQL (0.1ms) BEGIN
1530
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 12, '2010-02-01 23:13:52', NULL, 4)
1531
- SQL (0.6ms) COMMIT
1532
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
1533
- SQL (0.1ms) BEGIN
1534
- SQL (0.1ms) COMMIT
1535
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1536
- SQL (0.1ms) BEGIN
1537
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:52', `has_read` = 1 WHERE `id` = 5
1538
- SQL (0.7ms) COMMIT
1539
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1540
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1541
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
1542
- SQL (0.1ms) BEGIN
1543
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:13:52', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:13:52', 12)
1544
- SQL (0.7ms) COMMIT
1545
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1546
- SQL (0.1ms) BEGIN
1547
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:52', `has_read` = 0 WHERE `id` = 5
1548
- SQL (0.6ms) COMMIT
1549
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1550
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1551
- SQL (0.1ms) BEGIN
1552
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1553
- SQL (0.6ms) COMMIT
1554
- SQL (0.1ms) BEGIN
1555
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1556
- SQL (0.5ms) COMMIT
1557
- SQL (0.1ms) BEGIN
1558
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1559
- SQL (0.5ms) COMMIT
1560
- SQL (0.1ms) BEGIN
1561
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:52', 'Title 4', 'Body 4', '2010-02-01 23:13:52', 1, 13)
1562
- SQL (0.6ms) COMMIT
1563
- SQL (0.1ms) BEGIN
1564
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 14, '2010-02-01 23:13:52', NULL, 5)
1565
- SQL (1.0ms) COMMIT
1566
- SQL (0.1ms) BEGIN
1567
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 15, '2010-02-01 23:13:52', NULL, 5)
1568
- SQL (0.6ms) COMMIT
1569
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
1570
- SQL (0.1ms) BEGIN
1571
- SQL (0.1ms) COMMIT
1572
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1573
- SQL (0.1ms) BEGIN
1574
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
1575
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
1576
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
1577
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
1578
- SQL (0.7ms) COMMIT
1579
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1580
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
1581
- SQL (0.1ms) BEGIN
1582
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1583
- SQL (0.6ms) COMMIT
1584
- SQL (0.1ms) BEGIN
1585
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1586
- SQL (0.6ms) COMMIT
1587
- SQL (0.1ms) BEGIN
1588
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:13:52', '2010-02-01 23:13:52')
1589
- SQL (0.6ms) COMMIT
1590
- SQL (0.1ms) BEGIN
1591
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:13:52', 'Title 5', 'Body 5', '2010-02-01 23:13:52', 1, 16)
1592
- SQL (0.7ms) COMMIT
1593
- SQL (0.1ms) BEGIN
1594
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 17, '2010-02-01 23:13:52', NULL, 6)
1595
- SQL (0.5ms) COMMIT
1596
- SQL (0.1ms) BEGIN
1597
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:13:52', 18, '2010-02-01 23:13:52', NULL, 6)
1598
- SQL (0.6ms) COMMIT
1599
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1600
- SQL (0.1ms) BEGIN
1601
- SQL (0.1ms) COMMIT
1602
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1603
- SQL (0.1ms) BEGIN
1604
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:13:52', 'MessageThread', 'Test', 6, '2010-02-01 23:13:52', 17)
1605
- SQL (0.7ms) COMMIT
1606
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1607
- SQL (0.1ms) BEGIN
1608
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:52', `has_read` = 0 WHERE `id` = 10
1609
- SQL (0.7ms) COMMIT
1610
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
1611
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
1612
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1613
- SQL (0.1ms) BEGIN
1614
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:13:52', 'MessageThread', 'Tester', 6, '2010-02-01 23:13:52', 18)
1615
- SQL (0.7ms) COMMIT
1616
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1617
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1618
- SQL (0.1ms) BEGIN
1619
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:13:52', `has_read` = 0 WHERE `id` = 9
1620
- SQL (0.7ms) COMMIT
1621
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
1622
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
1623
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1624
- SQL (0.2ms) SET NAMES 'utf8'
1625
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
1626
- SQL (0.5ms) SHOW TABLES
1627
- SQL (2.2ms) DROP TABLE `comments`
1628
- SQL (122.2ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1629
- SQL (0.5ms) SHOW TABLES
1630
- SQL (1.7ms) DROP TABLE `message_threads`
1631
- SQL (407.1ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1632
- SQL (0.6ms) SHOW TABLES
1633
- SQL (1.5ms) DROP TABLE `recipients`
1634
- SQL (99.8ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1635
- SQL (0.7ms) SHOW TABLES
1636
- SQL (2.0ms) DROP TABLE `users`
1637
- SQL (132.3ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1638
- SQL (0.5ms) SHOW TABLES
1639
- SQL (0.2ms) SELECT version FROM `schema_migrations`
1640
- User Columns (1.6ms) SHOW FIELDS FROM `users`
1641
- SQL (0.1ms) BEGIN
1642
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1643
- SQL (0.6ms) COMMIT
1644
- SQL (0.1ms) BEGIN
1645
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1646
- SQL (0.6ms) COMMIT
1647
- SQL (0.1ms) BEGIN
1648
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1649
- SQL (0.5ms) COMMIT
1650
- SQL (0.2ms) BEGIN
1651
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1652
- SQL (0.7ms) COMMIT
1653
- SQL (0.1ms) BEGIN
1654
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1655
- SQL (0.8ms) COMMIT
1656
- SQL (0.1ms) BEGIN
1657
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1658
- SQL (0.6ms) COMMIT
1659
- MessageThread Columns (1.5ms) SHOW FIELDS FROM `message_threads`
1660
- SQL (0.1ms) BEGIN
1661
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:42:59', 'Title', 'Body', '2010-02-01 23:42:59', 1, 4)
1662
- SQL (0.9ms) COMMIT
1663
- Recipient Columns (1.4ms) SHOW FIELDS FROM `recipients`
1664
- SQL (0.2ms) BEGIN
1665
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 5, '2010-02-01 23:42:59', NULL, 1)
1666
- SQL (0.6ms) COMMIT
1667
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
1668
- SQL (0.1ms) BEGIN
1669
- SQL (0.1ms) COMMIT
1670
- SQL (0.2ms) BEGIN
1671
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1672
- SQL (0.7ms) COMMIT
1673
- SQL (0.1ms) BEGIN
1674
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1675
- SQL (0.6ms) COMMIT
1676
- SQL (0.1ms) BEGIN
1677
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1678
- SQL (0.5ms) COMMIT
1679
- SQL (0.1ms) BEGIN
1680
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:42:59', 'Title 1', 'Body 1', '2010-02-01 23:42:59', 1, 7)
1681
- SQL (0.6ms) COMMIT
1682
- SQL (0.1ms) BEGIN
1683
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 8, '2010-02-01 23:42:59', NULL, 2)
1684
- SQL (0.7ms) COMMIT
1685
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
1686
- SQL (0.1ms) BEGIN
1687
- SQL (0.1ms) COMMIT
1688
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1689
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1690
- SQL (0.1ms) BEGIN
1691
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:42:59', 'Title 2', 'Body 2', '2010-02-01 23:42:59', 1, 8)
1692
- SQL (0.7ms) COMMIT
1693
- SQL (0.1ms) BEGIN
1694
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 7, '2010-02-01 23:42:59', NULL, 3)
1695
- SQL (0.6ms) COMMIT
1696
- SQL (0.1ms) BEGIN
1697
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 9, '2010-02-01 23:42:59', NULL, 3)
1698
- SQL (0.7ms) COMMIT
1699
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
1700
- SQL (0.1ms) BEGIN
1701
- SQL (0.1ms) COMMIT
1702
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
1703
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
1704
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
1705
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1706
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1707
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
1708
- SQL (0.1ms) BEGIN
1709
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1710
- SQL (0.6ms) COMMIT
1711
- SQL (0.1ms) BEGIN
1712
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1713
- SQL (0.7ms) COMMIT
1714
- SQL (0.1ms) BEGIN
1715
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1716
- SQL (0.5ms) COMMIT
1717
- SQL (0.1ms) BEGIN
1718
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:42:59', 'Title 3', 'Body 3', '2010-02-01 23:42:59', 1, 10)
1719
- SQL (0.6ms) COMMIT
1720
- SQL (0.1ms) BEGIN
1721
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 11, '2010-02-01 23:42:59', NULL, 4)
1722
- SQL (0.6ms) COMMIT
1723
- SQL (0.1ms) BEGIN
1724
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 12, '2010-02-01 23:42:59', NULL, 4)
1725
- SQL (0.6ms) COMMIT
1726
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
1727
- SQL (0.1ms) BEGIN
1728
- SQL (0.1ms) COMMIT
1729
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1730
- SQL (0.1ms) BEGIN
1731
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:42:59', `has_read` = 1 WHERE `id` = 5
1732
- SQL (0.7ms) COMMIT
1733
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1734
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1735
- Comment Columns (1.6ms) SHOW FIELDS FROM `comments`
1736
- SQL (0.1ms) BEGIN
1737
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:42:59', 'MessageThread', 'This is totally awesome', 4, '2010-02-01 23:42:59', 12)
1738
- SQL (0.7ms) COMMIT
1739
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1740
- SQL (0.2ms) BEGIN
1741
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:42:59', `has_read` = 0 WHERE `id` = 5
1742
- SQL (0.5ms) COMMIT
1743
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1744
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1745
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1746
- SQL (0.1ms) BEGIN
1747
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 5
1748
- SQL (0.7ms) COMMIT
1749
- SQL (0.1ms) BEGIN
1750
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:42:59', 'MessageThread', 'Seriously, i love this', 4, '2010-02-01 23:42:59', 12)
1751
- SQL (0.6ms) COMMIT
1752
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1753
- SQL (0.1ms) BEGIN
1754
- SQL (0.1ms) COMMIT
1755
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') 
1756
- SQL (0.1ms) BEGIN
1757
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1758
- SQL (0.6ms) COMMIT
1759
- SQL (0.1ms) BEGIN
1760
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1761
- SQL (0.6ms) COMMIT
1762
- SQL (0.1ms) BEGIN
1763
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1764
- SQL (0.6ms) COMMIT
1765
- SQL (0.1ms) BEGIN
1766
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:42:59', 'Title 4', 'Body 4', '2010-02-01 23:42:59', 1, 13)
1767
- SQL (0.5ms) COMMIT
1768
- SQL (0.1ms) BEGIN
1769
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 14, '2010-02-01 23:42:59', NULL, 5)
1770
- SQL (0.5ms) COMMIT
1771
- SQL (0.1ms) BEGIN
1772
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 15, '2010-02-01 23:42:59', NULL, 5)
1773
- SQL (0.6ms) COMMIT
1774
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
1775
- SQL (0.1ms) BEGIN
1776
- SQL (0.1ms) COMMIT
1777
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1778
- SQL (0.1ms) BEGIN
1779
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
1780
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
1781
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
1782
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
1783
- SQL (0.6ms) COMMIT
1784
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1785
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
1786
- SQL (0.1ms) BEGIN
1787
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1788
- SQL (0.6ms) COMMIT
1789
- SQL (0.1ms) BEGIN
1790
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1791
- SQL (0.7ms) COMMIT
1792
- SQL (0.1ms) BEGIN
1793
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-01 23:42:59', '2010-02-01 23:42:59')
1794
- SQL (0.6ms) COMMIT
1795
- SQL (0.1ms) BEGIN
1796
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-01 23:42:59', 'Title 5', 'Body 5', '2010-02-01 23:42:59', 1, 16)
1797
- SQL (0.7ms) COMMIT
1798
- SQL (0.1ms) BEGIN
1799
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 17, '2010-02-01 23:42:59', NULL, 6)
1800
- SQL (0.6ms) COMMIT
1801
- SQL (0.1ms) BEGIN
1802
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-01 23:42:59', 18, '2010-02-01 23:42:59', NULL, 6)
1803
- SQL (0.5ms) COMMIT
1804
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1805
- SQL (0.1ms) BEGIN
1806
- SQL (0.1ms) COMMIT
1807
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1808
- SQL (0.1ms) BEGIN
1809
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:42:59', 'MessageThread', 'Test', 6, '2010-02-01 23:42:59', 17)
1810
- SQL (0.7ms) COMMIT
1811
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1812
- SQL (0.1ms) BEGIN
1813
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:42:59', `has_read` = 0 WHERE `id` = 10
1814
- SQL (0.6ms) COMMIT
1815
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
1816
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
1817
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1818
- SQL (0.1ms) BEGIN
1819
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-01 23:42:59', 'MessageThread', 'Tester', 6, '2010-02-01 23:42:59', 18)
1820
- SQL (0.7ms) COMMIT
1821
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1822
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
1823
- SQL (0.1ms) BEGIN
1824
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-01 23:42:59', `has_read` = 0 WHERE `id` = 9
1825
- SQL (1.0ms) COMMIT
1826
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
1827
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
1828
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
1829
- SQL (0.1ms) SET NAMES 'utf8'
1830
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
1831
- SQL (0.4ms) SHOW TABLES
1832
- SQL (1.9ms) DROP TABLE `comments`
1833
- SQL (140.8ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1834
- SQL (0.7ms) SHOW TABLES
1835
- SQL (3.1ms) DROP TABLE `message_threads`
1836
- SQL (337.4ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1837
- SQL (0.7ms) SHOW TABLES
1838
- SQL (2.1ms) DROP TABLE `recipients`
1839
- SQL (117.6ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1840
- SQL (0.7ms) SHOW TABLES
1841
- SQL (21.5ms) DROP TABLE `users`
1842
- SQL (119.8ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
1843
- SQL (0.7ms) SHOW TABLES
1844
- SQL (0.4ms) SELECT version FROM `schema_migrations`
1845
- User Columns (2.2ms) SHOW FIELDS FROM `users`
1846
- SQL (0.4ms) BEGIN
1847
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1848
- SQL (0.6ms) COMMIT
1849
- SQL (0.1ms) BEGIN
1850
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1851
- SQL (0.6ms) COMMIT
1852
- SQL (0.1ms) BEGIN
1853
- User Create (0.4ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1854
- SQL (0.7ms) COMMIT
1855
- SQL (0.2ms) BEGIN
1856
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1857
- SQL (0.7ms) COMMIT
1858
- SQL (0.1ms) BEGIN
1859
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1860
- SQL (0.7ms) COMMIT
1861
- SQL (0.1ms) BEGIN
1862
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1863
- SQL (0.7ms) COMMIT
1864
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
1865
- SQL (0.1ms) BEGIN
1866
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title', 'Body', '2010-02-02 00:06:33', 1, 4)
1867
- SQL (0.6ms) COMMIT
1868
- Recipient Columns (1.5ms) SHOW FIELDS FROM `recipients`
1869
- SQL (0.1ms) BEGIN
1870
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 5, '2010-02-02 00:06:33', NULL, 1)
1871
- SQL (0.6ms) COMMIT
1872
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
1873
- SQL (0.1ms) BEGIN
1874
- SQL (0.1ms) COMMIT
1875
- SQL (0.1ms) BEGIN
1876
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1877
- SQL (0.7ms) COMMIT
1878
- SQL (0.1ms) BEGIN
1879
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1880
- SQL (0.6ms) COMMIT
1881
- SQL (0.1ms) BEGIN
1882
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1883
- SQL (1.1ms) COMMIT
1884
- SQL (0.1ms) BEGIN
1885
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title 1', 'Body 1', '2010-02-02 00:06:33', 1, 7)
1886
- SQL (0.7ms) COMMIT
1887
- SQL (0.1ms) BEGIN
1888
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 8, '2010-02-02 00:06:33', NULL, 2)
1889
- SQL (0.7ms) COMMIT
1890
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
1891
- SQL (0.1ms) BEGIN
1892
- SQL (0.1ms) COMMIT
1893
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1894
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1895
- SQL (0.1ms) BEGIN
1896
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title 2', 'Body 2', '2010-02-02 00:06:33', 1, 8)
1897
- SQL (0.7ms) COMMIT
1898
- SQL (0.1ms) BEGIN
1899
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 7, '2010-02-02 00:06:33', NULL, 3)
1900
- SQL (0.7ms) COMMIT
1901
- SQL (0.1ms) BEGIN
1902
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 9, '2010-02-02 00:06:33', NULL, 3)
1903
- SQL (0.6ms) COMMIT
1904
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
1905
- SQL (0.1ms) BEGIN
1906
- SQL (0.1ms) COMMIT
1907
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
1908
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
1909
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
1910
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
1911
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
1912
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
1913
- SQL (0.1ms) BEGIN
1914
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1915
- SQL (0.7ms) COMMIT
1916
- SQL (0.1ms) BEGIN
1917
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1918
- SQL (0.5ms) COMMIT
1919
- SQL (0.1ms) BEGIN
1920
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1921
- SQL (0.5ms) COMMIT
1922
- SQL (0.1ms) BEGIN
1923
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title 3', 'Body 3', '2010-02-02 00:06:33', 1, 10)
1924
- SQL (0.8ms) COMMIT
1925
- SQL (0.1ms) BEGIN
1926
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 11, '2010-02-02 00:06:33', NULL, 4)
1927
- SQL (0.6ms) COMMIT
1928
- SQL (0.1ms) BEGIN
1929
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 12, '2010-02-02 00:06:33', NULL, 4)
1930
- SQL (0.5ms) COMMIT
1931
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
1932
- SQL (0.1ms) BEGIN
1933
- SQL (0.1ms) COMMIT
1934
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1935
- SQL (0.1ms) BEGIN
1936
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:06:33', `has_read` = 1 WHERE `id` = 5
1937
- SQL (0.5ms) COMMIT
1938
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1939
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1940
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
1941
- SQL (0.1ms) BEGIN
1942
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:06:33', 'MessageThread', 'This is totally awesome', 4, '2010-02-02 00:06:33', 12)
1943
- SQL (0.7ms) COMMIT
1944
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1945
- SQL (0.1ms) BEGIN
1946
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:06:33', `has_read` = 0 WHERE `id` = 5
1947
- SQL (0.7ms) COMMIT
1948
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1949
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
1950
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
1951
- SQL (0.1ms) BEGIN
1952
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 5
1953
- SQL (0.6ms) COMMIT
1954
- SQL (0.1ms) BEGIN
1955
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:06:33', 'MessageThread', 'Seriously, i love this', 4, '2010-02-02 00:06:33', 12)
1956
- SQL (0.5ms) COMMIT
1957
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
1958
- SQL (0.1ms) BEGIN
1959
- SQL (0.1ms) COMMIT
1960
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') 
1961
- SQL (0.1ms) BEGIN
1962
- User Create (0.5ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1963
- SQL (0.7ms) COMMIT
1964
- SQL (0.1ms) BEGIN
1965
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1966
- SQL (0.6ms) COMMIT
1967
- SQL (0.1ms) BEGIN
1968
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1969
- SQL (0.6ms) COMMIT
1970
- SQL (0.1ms) BEGIN
1971
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title 4', 'Body 4', '2010-02-02 00:06:33', 1, 13)
1972
- SQL (0.9ms) COMMIT
1973
- SQL (0.1ms) BEGIN
1974
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 14, '2010-02-02 00:06:33', NULL, 5)
1975
- SQL (0.6ms) COMMIT
1976
- SQL (0.1ms) BEGIN
1977
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 15, '2010-02-02 00:06:33', NULL, 5)
1978
- SQL (0.5ms) COMMIT
1979
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
1980
- SQL (0.1ms) BEGIN
1981
- SQL (0.1ms) COMMIT
1982
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1983
- SQL (0.1ms) BEGIN
1984
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
1985
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
1986
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
1987
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
1988
- SQL (0.5ms) COMMIT
1989
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
1990
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
1991
- SQL (0.2ms) BEGIN
1992
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1993
- SQL (0.6ms) COMMIT
1994
- SQL (0.1ms) BEGIN
1995
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1996
- SQL (0.6ms) COMMIT
1997
- SQL (0.1ms) BEGIN
1998
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
1999
- SQL (0.6ms) COMMIT
2000
- SQL (0.1ms) BEGIN
2001
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title 5', 'Body 5', '2010-02-02 00:06:33', 1, 16)
2002
- SQL (0.6ms) COMMIT
2003
- SQL (0.1ms) BEGIN
2004
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 17, '2010-02-02 00:06:33', NULL, 6)
2005
- SQL (0.6ms) COMMIT
2006
- SQL (0.1ms) BEGIN
2007
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 18, '2010-02-02 00:06:33', NULL, 6)
2008
- SQL (0.6ms) COMMIT
2009
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2010
- SQL (0.1ms) BEGIN
2011
- SQL (0.1ms) COMMIT
2012
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2013
- SQL (0.1ms) BEGIN
2014
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:06:33', 'MessageThread', 'Test', 6, '2010-02-02 00:06:33', 17)
2015
- SQL (0.7ms) COMMIT
2016
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2017
- SQL (0.1ms) BEGIN
2018
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:06:33', `has_read` = 0 WHERE `id` = 10
2019
- SQL (0.7ms) COMMIT
2020
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2021
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2022
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2023
- SQL (0.1ms) BEGIN
2024
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:06:33', 'MessageThread', 'Tester', 6, '2010-02-02 00:06:33', 18)
2025
- SQL (0.7ms) COMMIT
2026
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2027
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2028
- SQL (0.1ms) BEGIN
2029
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:06:33', `has_read` = 0 WHERE `id` = 9
2030
- SQL (0.6ms) COMMIT
2031
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2032
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2033
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2034
- SQL (0.1ms) BEGIN
2035
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
2036
- SQL (0.8ms) COMMIT
2037
- SQL (0.1ms) BEGIN
2038
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
2039
- SQL (0.6ms) COMMIT
2040
- SQL (0.1ms) BEGIN
2041
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:06:33', '2010-02-02 00:06:33')
2042
- SQL (0.6ms) COMMIT
2043
- SQL (0.1ms) BEGIN
2044
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:06:33', 'Title 6', 'Body 6', '2010-02-02 00:06:33', 1, 19)
2045
- SQL (0.7ms) COMMIT
2046
- SQL (0.1ms) BEGIN
2047
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 20, '2010-02-02 00:06:33', NULL, 7)
2048
- SQL (0.5ms) COMMIT
2049
- SQL (0.1ms) BEGIN
2050
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:06:33', 21, '2010-02-02 00:06:33', NULL, 7)
2051
- SQL (0.6ms) COMMIT
2052
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2053
- SQL (0.1ms) BEGIN
2054
- SQL (0.1ms) COMMIT
2055
- SQL (0.1ms) BEGIN
2056
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES(NULL, '2010-02-02 00:06:33', '2010-02-02 00:06:33')
2057
- SQL (0.8ms) COMMIT
2058
- SQL (0.2ms) SET NAMES 'utf8'
2059
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
2060
- SQL (0.5ms) SHOW TABLES
2061
- SQL (1.9ms) DROP TABLE `comments`
2062
- SQL (73.2ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2063
- SQL (0.6ms) SHOW TABLES
2064
- SQL (21.2ms) DROP TABLE `message_threads`
2065
- SQL (216.5ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2066
- SQL (1.6ms) SHOW TABLES
2067
- SQL (2.9ms) DROP TABLE `recipients`
2068
- SQL (116.6ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2069
- SQL (1.1ms) SHOW TABLES
2070
- SQL (1.9ms) DROP TABLE `users`
2071
- SQL (118.9ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2072
- SQL (0.7ms) SHOW TABLES
2073
- SQL (0.5ms) SELECT version FROM `schema_migrations`
2074
- User Columns (1.7ms) SHOW FIELDS FROM `users`
2075
- SQL (0.1ms) BEGIN
2076
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2077
- SQL (0.7ms) COMMIT
2078
- SQL (0.1ms) BEGIN
2079
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2080
- SQL (0.6ms) COMMIT
2081
- SQL (0.1ms) BEGIN
2082
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2083
- SQL (0.7ms) COMMIT
2084
- SQL (0.1ms) BEGIN
2085
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2086
- SQL (0.7ms) COMMIT
2087
- SQL (0.1ms) BEGIN
2088
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2089
- SQL (0.7ms) COMMIT
2090
- SQL (0.1ms) BEGIN
2091
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2092
- SQL (0.6ms) COMMIT
2093
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
2094
- SQL (0.1ms) BEGIN
2095
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title', 'Body', '2010-02-02 00:07:32', 1, 4)
2096
- SQL (0.7ms) COMMIT
2097
- Recipient Columns (1.4ms) SHOW FIELDS FROM `recipients`
2098
- SQL (0.1ms) BEGIN
2099
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 5, '2010-02-02 00:07:32', NULL, 1)
2100
- SQL (0.7ms) COMMIT
2101
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
2102
- SQL (0.1ms) BEGIN
2103
- SQL (0.1ms) COMMIT
2104
- SQL (0.1ms) BEGIN
2105
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2106
- SQL (0.7ms) COMMIT
2107
- SQL (0.1ms) BEGIN
2108
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2109
- SQL (0.6ms) COMMIT
2110
- SQL (0.1ms) BEGIN
2111
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2112
- SQL (0.5ms) COMMIT
2113
- SQL (0.1ms) BEGIN
2114
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title 1', 'Body 1', '2010-02-02 00:07:32', 1, 7)
2115
- SQL (0.5ms) COMMIT
2116
- SQL (0.1ms) BEGIN
2117
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 8, '2010-02-02 00:07:32', NULL, 2)
2118
- SQL (0.7ms) COMMIT
2119
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
2120
- SQL (0.1ms) BEGIN
2121
- SQL (0.1ms) COMMIT
2122
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
2123
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
2124
- SQL (0.1ms) BEGIN
2125
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title 2', 'Body 2', '2010-02-02 00:07:32', 1, 8)
2126
- SQL (0.7ms) COMMIT
2127
- SQL (0.1ms) BEGIN
2128
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 7, '2010-02-02 00:07:32', NULL, 3)
2129
- SQL (0.7ms) COMMIT
2130
- SQL (0.1ms) BEGIN
2131
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 9, '2010-02-02 00:07:32', NULL, 3)
2132
- SQL (0.7ms) COMMIT
2133
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
2134
- SQL (0.1ms) BEGIN
2135
- SQL (0.1ms) COMMIT
2136
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
2137
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
2138
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
2139
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
2140
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
2141
- SQL (0.1ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
2142
- SQL (0.1ms) BEGIN
2143
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2144
- SQL (1.2ms) COMMIT
2145
- SQL (0.1ms) BEGIN
2146
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2147
- SQL (0.7ms) COMMIT
2148
- SQL (0.1ms) BEGIN
2149
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2150
- SQL (0.6ms) COMMIT
2151
- SQL (0.1ms) BEGIN
2152
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title 3', 'Body 3', '2010-02-02 00:07:32', 1, 10)
2153
- SQL (0.6ms) COMMIT
2154
- SQL (0.1ms) BEGIN
2155
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 11, '2010-02-02 00:07:32', NULL, 4)
2156
- SQL (0.5ms) COMMIT
2157
- SQL (0.1ms) BEGIN
2158
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 12, '2010-02-02 00:07:32', NULL, 4)
2159
- SQL (0.6ms) COMMIT
2160
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
2161
- SQL (0.1ms) BEGIN
2162
- SQL (0.1ms) COMMIT
2163
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
2164
- SQL (0.1ms) BEGIN
2165
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:32', `has_read` = 1 WHERE `id` = 5
2166
- SQL (0.6ms) COMMIT
2167
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2168
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2169
- Comment Columns (1.6ms) SHOW FIELDS FROM `comments`
2170
- SQL (0.1ms) BEGIN
2171
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:32', 'MessageThread', 'This is totally awesome', 4, '2010-02-02 00:07:32', 12)
2172
- SQL (0.7ms) COMMIT
2173
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2174
- SQL (0.1ms) BEGIN
2175
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:32', `has_read` = 0 WHERE `id` = 5
2176
- SQL (0.6ms) COMMIT
2177
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2178
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2179
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
2180
- SQL (0.1ms) BEGIN
2181
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 5
2182
- SQL (0.5ms) COMMIT
2183
- SQL (0.1ms) BEGIN
2184
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:32', 'MessageThread', 'Seriously, i love this', 4, '2010-02-02 00:07:32', 12)
2185
- SQL (0.6ms) COMMIT
2186
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2187
- SQL (0.1ms) BEGIN
2188
- SQL (0.1ms) COMMIT
2189
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') 
2190
- SQL (0.1ms) BEGIN
2191
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2192
- SQL (0.7ms) COMMIT
2193
- SQL (0.1ms) BEGIN
2194
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2195
- SQL (0.7ms) COMMIT
2196
- SQL (0.1ms) BEGIN
2197
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2198
- SQL (0.6ms) COMMIT
2199
- SQL (0.1ms) BEGIN
2200
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title 4', 'Body 4', '2010-02-02 00:07:32', 1, 13)
2201
- SQL (0.6ms) COMMIT
2202
- SQL (0.1ms) BEGIN
2203
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 14, '2010-02-02 00:07:32', NULL, 5)
2204
- SQL (0.6ms) COMMIT
2205
- SQL (0.1ms) BEGIN
2206
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 15, '2010-02-02 00:07:32', NULL, 5)
2207
- SQL (0.5ms) COMMIT
2208
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
2209
- SQL (0.1ms) BEGIN
2210
- SQL (0.1ms) COMMIT
2211
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
2212
- SQL (0.1ms) BEGIN
2213
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
2214
- Recipient Destroy (0.3ms) DELETE FROM `recipients` WHERE `id` = 7
2215
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 8
2216
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
2217
- SQL (0.8ms) COMMIT
2218
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
2219
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
2220
- SQL (0.1ms) BEGIN
2221
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2222
- SQL (0.7ms) COMMIT
2223
- SQL (0.1ms) BEGIN
2224
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2225
- SQL (0.6ms) COMMIT
2226
- SQL (0.1ms) BEGIN
2227
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2228
- SQL (0.7ms) COMMIT
2229
- SQL (0.1ms) BEGIN
2230
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title 5', 'Body 5', '2010-02-02 00:07:32', 1, 16)
2231
- SQL (0.7ms) COMMIT
2232
- SQL (0.1ms) BEGIN
2233
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 17, '2010-02-02 00:07:32', NULL, 6)
2234
- SQL (0.7ms) COMMIT
2235
- SQL (0.1ms) BEGIN
2236
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 18, '2010-02-02 00:07:32', NULL, 6)
2237
- SQL (0.6ms) COMMIT
2238
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2239
- SQL (0.1ms) BEGIN
2240
- SQL (0.1ms) COMMIT
2241
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2242
- SQL (0.1ms) BEGIN
2243
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:32', 'MessageThread', 'Test', 6, '2010-02-02 00:07:32', 17)
2244
- SQL (0.7ms) COMMIT
2245
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2246
- SQL (0.1ms) BEGIN
2247
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:32', `has_read` = 0 WHERE `id` = 10
2248
- SQL (1.2ms) COMMIT
2249
- MessageThread Load (0.3ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2250
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2251
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2252
- SQL (0.1ms) BEGIN
2253
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:32', 'MessageThread', 'Tester', 6, '2010-02-02 00:07:32', 18)
2254
- SQL (0.7ms) COMMIT
2255
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2256
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2257
- SQL (0.1ms) BEGIN
2258
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:32', `has_read` = 0 WHERE `id` = 9
2259
- SQL (0.6ms) COMMIT
2260
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2261
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2262
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2263
- SQL (0.1ms) BEGIN
2264
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2265
- SQL (0.6ms) COMMIT
2266
- SQL (0.1ms) BEGIN
2267
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2268
- SQL (0.7ms) COMMIT
2269
- SQL (0.1ms) BEGIN
2270
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2271
- SQL (0.7ms) COMMIT
2272
- SQL (0.1ms) BEGIN
2273
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:32', 'Title 6', 'Body 6', '2010-02-02 00:07:32', 1, 19)
2274
- SQL (0.6ms) COMMIT
2275
- SQL (0.1ms) BEGIN
2276
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 20, '2010-02-02 00:07:32', NULL, 7)
2277
- SQL (0.6ms) COMMIT
2278
- SQL (0.1ms) BEGIN
2279
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:32', 21, '2010-02-02 00:07:32', NULL, 7)
2280
- SQL (0.7ms) COMMIT
2281
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2282
- SQL (0.1ms) BEGIN
2283
- SQL (0.1ms) COMMIT
2284
- SQL (0.1ms) BEGIN
2285
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES(NULL, '2010-02-02 00:07:32', '2010-02-02 00:07:32')
2286
- SQL (0.6ms) COMMIT
2287
- SQL (0.2ms) SET NAMES 'utf8'
2288
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
2289
- SQL (0.4ms) SHOW TABLES
2290
- SQL (1.8ms) DROP TABLE `comments`
2291
- SQL (61.3ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2292
- SQL (0.8ms) SHOW TABLES
2293
- SQL (3.1ms) DROP TABLE `message_threads`
2294
- SQL (150.9ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2295
- SQL (1.6ms) SHOW TABLES
2296
- SQL (1.8ms) DROP TABLE `recipients`
2297
- SQL (144.3ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2298
- SQL (0.9ms) SHOW TABLES
2299
- SQL (2.5ms) DROP TABLE `users`
2300
- SQL (113.4ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2301
- SQL (1.5ms) SHOW TABLES
2302
- SQL (0.3ms) SELECT version FROM `schema_migrations`
2303
- User Columns (1.6ms) SHOW FIELDS FROM `users`
2304
- SQL (0.1ms) BEGIN
2305
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2306
- SQL (0.7ms) COMMIT
2307
- SQL (0.1ms) BEGIN
2308
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2309
- SQL (0.5ms) COMMIT
2310
- SQL (0.1ms) BEGIN
2311
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2312
- SQL (0.6ms) COMMIT
2313
- SQL (0.1ms) BEGIN
2314
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2315
- SQL (0.8ms) COMMIT
2316
- SQL (0.1ms) BEGIN
2317
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2318
- SQL (0.7ms) COMMIT
2319
- SQL (0.1ms) BEGIN
2320
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2321
- SQL (0.7ms) COMMIT
2322
- MessageThread Columns (1.5ms) SHOW FIELDS FROM `message_threads`
2323
- SQL (0.1ms) BEGIN
2324
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title', 'Body', '2010-02-02 00:07:47', 1, 4)
2325
- SQL (0.7ms) COMMIT
2326
- Recipient Columns (1.3ms) SHOW FIELDS FROM `recipients`
2327
- SQL (0.1ms) BEGIN
2328
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 5, '2010-02-02 00:07:47', NULL, 1)
2329
- SQL (0.7ms) COMMIT
2330
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
2331
- SQL (0.1ms) BEGIN
2332
- SQL (0.1ms) COMMIT
2333
- SQL (0.1ms) BEGIN
2334
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2335
- SQL (0.6ms) COMMIT
2336
- SQL (0.1ms) BEGIN
2337
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2338
- SQL (0.6ms) COMMIT
2339
- SQL (0.1ms) BEGIN
2340
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2341
- SQL (0.7ms) COMMIT
2342
- SQL (0.1ms) BEGIN
2343
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title 1', 'Body 1', '2010-02-02 00:07:47', 1, 7)
2344
- SQL (0.6ms) COMMIT
2345
- SQL (0.1ms) BEGIN
2346
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 8, '2010-02-02 00:07:47', NULL, 2)
2347
- SQL (0.5ms) COMMIT
2348
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
2349
- SQL (0.1ms) BEGIN
2350
- SQL (0.1ms) COMMIT
2351
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
2352
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
2353
- SQL (0.1ms) BEGIN
2354
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title 2', 'Body 2', '2010-02-02 00:07:47', 1, 8)
2355
- SQL (0.5ms) COMMIT
2356
- SQL (0.1ms) BEGIN
2357
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 7, '2010-02-02 00:07:47', NULL, 3)
2358
- SQL (0.6ms) COMMIT
2359
- SQL (0.1ms) BEGIN
2360
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 9, '2010-02-02 00:07:47', NULL, 3)
2361
- SQL (0.6ms) COMMIT
2362
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
2363
- SQL (0.1ms) BEGIN
2364
- SQL (0.1ms) COMMIT
2365
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
2366
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
2367
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
2368
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
2369
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
2370
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
2371
- SQL (0.1ms) BEGIN
2372
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2373
- SQL (0.7ms) COMMIT
2374
- SQL (0.1ms) BEGIN
2375
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2376
- SQL (0.5ms) COMMIT
2377
- SQL (0.1ms) BEGIN
2378
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2379
- SQL (0.6ms) COMMIT
2380
- SQL (0.1ms) BEGIN
2381
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title 3', 'Body 3', '2010-02-02 00:07:47', 1, 10)
2382
- SQL (0.6ms) COMMIT
2383
- SQL (0.1ms) BEGIN
2384
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 11, '2010-02-02 00:07:47', NULL, 4)
2385
- SQL (0.7ms) COMMIT
2386
- SQL (0.1ms) BEGIN
2387
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 12, '2010-02-02 00:07:47', NULL, 4)
2388
- SQL (0.6ms) COMMIT
2389
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
2390
- SQL (0.1ms) BEGIN
2391
- SQL (0.1ms) COMMIT
2392
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
2393
- SQL (0.1ms) BEGIN
2394
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:47', `has_read` = 1 WHERE `id` = 5
2395
- SQL (0.7ms) COMMIT
2396
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2397
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2398
- Comment Columns (1.5ms) SHOW FIELDS FROM `comments`
2399
- SQL (0.1ms) BEGIN
2400
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:47', 'MessageThread', 'This is totally awesome', 4, '2010-02-02 00:07:47', 12)
2401
- SQL (0.7ms) COMMIT
2402
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2403
- SQL (0.1ms) BEGIN
2404
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:47', `has_read` = 0 WHERE `id` = 5
2405
- SQL (0.7ms) COMMIT
2406
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2407
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2408
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
2409
- SQL (0.1ms) BEGIN
2410
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 5
2411
- SQL (0.6ms) COMMIT
2412
- SQL (0.1ms) BEGIN
2413
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:47', 'MessageThread', 'Seriously, i love this', 4, '2010-02-02 00:07:47', 12)
2414
- SQL (1.2ms) COMMIT
2415
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2416
- SQL (0.1ms) BEGIN
2417
- SQL (0.1ms) COMMIT
2418
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') 
2419
- SQL (0.1ms) BEGIN
2420
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2421
- SQL (0.7ms) COMMIT
2422
- SQL (0.1ms) BEGIN
2423
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2424
- SQL (0.6ms) COMMIT
2425
- SQL (0.1ms) BEGIN
2426
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2427
- SQL (0.6ms) COMMIT
2428
- SQL (0.1ms) BEGIN
2429
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title 4', 'Body 4', '2010-02-02 00:07:47', 1, 13)
2430
- SQL (0.7ms) COMMIT
2431
- SQL (0.1ms) BEGIN
2432
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 14, '2010-02-02 00:07:47', NULL, 5)
2433
- SQL (0.7ms) COMMIT
2434
- SQL (0.1ms) BEGIN
2435
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 15, '2010-02-02 00:07:47', NULL, 5)
2436
- SQL (0.5ms) COMMIT
2437
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
2438
- SQL (0.1ms) BEGIN
2439
- SQL (0.1ms) COMMIT
2440
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
2441
- SQL (0.1ms) BEGIN
2442
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') 
2443
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
2444
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
2445
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
2446
- SQL (0.6ms) COMMIT
2447
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
2448
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
2449
- SQL (0.1ms) BEGIN
2450
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2451
- SQL (0.7ms) COMMIT
2452
- SQL (0.1ms) BEGIN
2453
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2454
- SQL (0.5ms) COMMIT
2455
- SQL (0.1ms) BEGIN
2456
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2457
- SQL (0.7ms) COMMIT
2458
- SQL (0.1ms) BEGIN
2459
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title 5', 'Body 5', '2010-02-02 00:07:47', 1, 16)
2460
- SQL (0.7ms) COMMIT
2461
- SQL (0.1ms) BEGIN
2462
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 17, '2010-02-02 00:07:47', NULL, 6)
2463
- SQL (0.6ms) COMMIT
2464
- SQL (0.1ms) BEGIN
2465
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 18, '2010-02-02 00:07:47', NULL, 6)
2466
- SQL (0.6ms) COMMIT
2467
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2468
- SQL (0.1ms) BEGIN
2469
- SQL (0.1ms) COMMIT
2470
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2471
- SQL (0.1ms) BEGIN
2472
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:47', 'MessageThread', 'Test', 6, '2010-02-02 00:07:47', 17)
2473
- SQL (0.5ms) COMMIT
2474
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2475
- SQL (0.1ms) BEGIN
2476
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:47', `has_read` = 0 WHERE `id` = 10
2477
- SQL (0.6ms) COMMIT
2478
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2479
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2480
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2481
- SQL (0.1ms) BEGIN
2482
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 00:07:47', 'MessageThread', 'Tester', 6, '2010-02-02 00:07:47', 18)
2483
- SQL (0.7ms) COMMIT
2484
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2485
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2486
- SQL (0.1ms) BEGIN
2487
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 00:07:47', `has_read` = 0 WHERE `id` = 9
2488
- SQL (0.5ms) COMMIT
2489
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2490
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2491
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2492
- SQL (0.1ms) BEGIN
2493
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2494
- SQL (0.7ms) COMMIT
2495
- SQL (0.1ms) BEGIN
2496
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2497
- SQL (0.6ms) COMMIT
2498
- SQL (0.1ms) BEGIN
2499
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2500
- SQL (0.5ms) COMMIT
2501
- SQL (0.1ms) BEGIN
2502
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 00:07:47', 'Title 6', 'Body 6', '2010-02-02 00:07:47', 1, 19)
2503
- SQL (0.6ms) COMMIT
2504
- SQL (0.1ms) BEGIN
2505
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 20, '2010-02-02 00:07:47', NULL, 7)
2506
- SQL (0.7ms) COMMIT
2507
- SQL (0.1ms) BEGIN
2508
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 00:07:47', 21, '2010-02-02 00:07:47', NULL, 7)
2509
- SQL (0.6ms) COMMIT
2510
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2511
- SQL (0.1ms) BEGIN
2512
- SQL (0.1ms) COMMIT
2513
- SQL (0.1ms) BEGIN
2514
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES(NULL, '2010-02-02 00:07:47', '2010-02-02 00:07:47')
2515
- SQL (0.6ms) COMMIT
2516
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2517
- User Load (0.5ms) SELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) 
2518
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2519
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) 
2520
- SQL (0.1ms) SET NAMES 'utf8'
2521
- SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
2522
- SQL (72.5ms) SHOW TABLES
2523
- SQL (44.3ms) DROP TABLE `comments`
2524
- SQL (81.9ms) CREATE TABLE `comments` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `commentable_id` int(11), `commentable_type` varchar(255), `author_id` int(11), `body` text, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2525
- SQL (0.6ms) SHOW TABLES
2526
- SQL (2.5ms) DROP TABLE `message_threads`
2527
- SQL (333.6ms) CREATE TABLE `message_threads` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `author_id` int(11), `title` varchar(255), `body` text, `private_thread` tinyint(1) DEFAULT 1, `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2528
- SQL (1.2ms) SHOW TABLES
2529
- SQL (5.9ms) DROP TABLE `recipients`
2530
- SQL (113.4ms) CREATE TABLE `recipients` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `receiver_id` int(11), `receiver_type` varchar(255), `message_thread_id` int(11), `has_read` tinyint(1), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2531
- SQL (0.7ms) SHOW TABLES
2532
- SQL (3.1ms) DROP TABLE `users`
2533
- SQL (141.2ms) CREATE TABLE `users` (`id` int(11) DEFAULT NULL auto_increment PRIMARY KEY, `name` varchar(255), `created_at` datetime, `updated_at` datetime) ENGINE=InnoDB
2534
- SQL (0.9ms) SHOW TABLES
2535
- SQL (0.9ms) SELECT version FROM `schema_migrations`
2536
- User Columns (1.7ms) SHOW FIELDS FROM `users`
2537
- SQL (0.1ms) BEGIN
2538
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:39', '2010-02-02 01:10:39')
2539
- SQL (0.6ms) COMMIT
2540
- SQL (0.1ms) BEGIN
2541
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:39', '2010-02-02 01:10:39')
2542
- SQL (0.5ms) COMMIT
2543
- SQL (0.2ms) BEGIN
2544
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2545
- SQL (18.9ms) COMMIT
2546
- SQL (0.2ms) BEGIN
2547
- User Create (0.3ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2548
- SQL (0.7ms) COMMIT
2549
- SQL (0.1ms) BEGIN
2550
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2551
- SQL (0.6ms) COMMIT
2552
- SQL (0.1ms) BEGIN
2553
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2554
- SQL (0.6ms) COMMIT
2555
- MessageThread Columns (1.6ms) SHOW FIELDS FROM `message_threads`
2556
- SQL (0.1ms) BEGIN
2557
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title', 'Body', '2010-02-02 01:10:40', 1, 4)
2558
- SQL (0.6ms) COMMIT
2559
- Recipient Columns (1.3ms) SHOW FIELDS FROM `recipients`
2560
- SQL (0.1ms) BEGIN
2561
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 5, '2010-02-02 01:10:40', NULL, 1)
2562
- SQL (0.5ms) COMMIT
2563
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 1) ORDER BY has_read ASC, created_at DESC
2564
- SQL (0.1ms) BEGIN
2565
- SQL (0.1ms) COMMIT
2566
- SQL (0.1ms) BEGIN
2567
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2568
- SQL (0.6ms) COMMIT
2569
- SQL (0.1ms) BEGIN
2570
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2571
- SQL (8.1ms) COMMIT
2572
- SQL (0.1ms) BEGIN
2573
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2574
- SQL (0.5ms) COMMIT
2575
- SQL (0.1ms) BEGIN
2576
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 1', 'Body 1', '2010-02-02 01:10:40', 1, 7)
2577
- SQL (0.5ms) COMMIT
2578
- SQL (0.1ms) BEGIN
2579
- Recipient Create (0.3ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 8, '2010-02-02 01:10:40', NULL, 2)
2580
- SQL (0.5ms) COMMIT
2581
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 2) ORDER BY has_read ASC, created_at DESC
2582
- SQL (0.1ms) BEGIN
2583
- SQL (0.1ms) COMMIT
2584
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
2585
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
2586
- SQL (0.1ms) BEGIN
2587
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 2', 'Body 2', '2010-02-02 01:10:40', 1, 8)
2588
- SQL (0.5ms) COMMIT
2589
- SQL (0.1ms) BEGIN
2590
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 7, '2010-02-02 01:10:40', NULL, 3)
2591
- SQL (0.5ms) COMMIT
2592
- SQL (0.1ms) BEGIN
2593
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 9, '2010-02-02 01:10:40', NULL, 3)
2594
- SQL (0.5ms) COMMIT
2595
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 3) ORDER BY has_read ASC, created_at DESC
2596
- SQL (0.1ms) BEGIN
2597
- SQL (0.1ms) COMMIT
2598
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 7) 
2599
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 8) 
2600
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 9) 
2601
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 7 AND `recipients`.receiver_type = 'User') 
2602
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 8 AND `recipients`.receiver_type = 'User') 
2603
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 9 AND `recipients`.receiver_type = 'User') 
2604
- SQL (0.1ms) BEGIN
2605
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2606
- SQL (0.6ms) COMMIT
2607
- SQL (0.1ms) BEGIN
2608
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2609
- SQL (1.0ms) COMMIT
2610
- SQL (0.1ms) BEGIN
2611
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2612
- SQL (0.5ms) COMMIT
2613
- SQL (0.1ms) BEGIN
2614
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 3', 'Body 3', '2010-02-02 01:10:40', 1, 10)
2615
- SQL (0.6ms) COMMIT
2616
- SQL (0.1ms) BEGIN
2617
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 11, '2010-02-02 01:10:40', NULL, 4)
2618
- SQL (0.5ms) COMMIT
2619
- SQL (0.1ms) BEGIN
2620
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 12, '2010-02-02 01:10:40', NULL, 4)
2621
- SQL (0.5ms) COMMIT
2622
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 4) ORDER BY has_read ASC, created_at DESC
2623
- SQL (0.1ms) BEGIN
2624
- SQL (0.1ms) COMMIT
2625
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
2626
- SQL (0.1ms) BEGIN
2627
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 1 WHERE `id` = 5
2628
- SQL (0.6ms) COMMIT
2629
- SQL (0.4ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2630
- SQL (0.3ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2631
- Comment Columns (1.4ms) SHOW FIELDS FROM `comments`
2632
- SQL (0.1ms) BEGIN
2633
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'This is totally awesome', 4, '2010-02-02 01:10:40', 12)
2634
- SQL (0.5ms) COMMIT
2635
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2636
- SQL (0.1ms) BEGIN
2637
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 0 WHERE `id` = 5
2638
- SQL (0.5ms) COMMIT
2639
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 0) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2640
- SQL (0.7ms) SELECT count(*) AS count_all FROM `recipients` WHERE (((has_read = 1) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) AND (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User')) 
2641
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') ORDER BY has_read ASC, created_at DESC LIMIT 1
2642
- SQL (0.1ms) BEGIN
2643
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 5
2644
- SQL (0.7ms) COMMIT
2645
- SQL (0.1ms) BEGIN
2646
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'Seriously, i love this', 4, '2010-02-02 01:10:40', 12)
2647
- SQL (0.6ms) COMMIT
2648
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 12 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 4)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2649
- SQL (0.1ms) BEGIN
2650
- SQL (0.1ms) COMMIT
2651
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 11 AND `recipients`.receiver_type = 'User') 
2652
- SQL (0.1ms) BEGIN
2653
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2654
- SQL (0.7ms) COMMIT
2655
- SQL (0.1ms) BEGIN
2656
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2657
- SQL (0.6ms) COMMIT
2658
- SQL (0.1ms) BEGIN
2659
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2660
- SQL (0.7ms) COMMIT
2661
- SQL (0.1ms) BEGIN
2662
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 4', 'Body 4', '2010-02-02 01:10:40', 1, 13)
2663
- SQL (0.6ms) COMMIT
2664
- SQL (0.1ms) BEGIN
2665
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 14, '2010-02-02 01:10:40', NULL, 5)
2666
- SQL (0.5ms) COMMIT
2667
- SQL (0.1ms) BEGIN
2668
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 15, '2010-02-02 01:10:40', NULL, 5)
2669
- SQL (0.7ms) COMMIT
2670
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 5) ORDER BY has_read ASC, created_at DESC
2671
- SQL (0.1ms) BEGIN
2672
- SQL (0.1ms) COMMIT
2673
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
2674
- SQL (0.1ms) BEGIN
2675
- Comment Load (0.2ms) SELECT * FROM `comments` WHERE (`comments`.commentable_id = 5 AND `comments`.commentable_type = 'MessageThread') ORDER BY created_at asc
2676
- Recipient Destroy (0.2ms) DELETE FROM `recipients` WHERE `id` = 7
2677
- Recipient Destroy (0.1ms) DELETE FROM `recipients` WHERE `id` = 8
2678
- MessageThread Destroy (0.1ms) DELETE FROM `message_threads` WHERE `id` = 5
2679
- SQL (0.6ms) COMMIT
2680
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 14 AND `recipients`.receiver_type = 'User') 
2681
- SQL (0.2ms) SELECT count(*) AS count_all FROM `recipients` WHERE (`recipients`.receiver_id = 15 AND `recipients`.receiver_type = 'User') 
2682
- SQL (0.1ms) BEGIN
2683
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2684
- SQL (0.6ms) COMMIT
2685
- SQL (0.1ms) BEGIN
2686
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2687
- SQL (0.6ms) COMMIT
2688
- SQL (0.1ms) BEGIN
2689
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2690
- SQL (0.6ms) COMMIT
2691
- SQL (0.1ms) BEGIN
2692
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 5', 'Body 5', '2010-02-02 01:10:40', 1, 16)
2693
- SQL (0.6ms) COMMIT
2694
- SQL (0.1ms) BEGIN
2695
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 17, '2010-02-02 01:10:40', NULL, 6)
2696
- SQL (0.6ms) COMMIT
2697
- SQL (0.1ms) BEGIN
2698
- Recipient Create (0.1ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 18, '2010-02-02 01:10:40', NULL, 6)
2699
- SQL (0.5ms) COMMIT
2700
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2701
- SQL (0.1ms) BEGIN
2702
- SQL (0.1ms) COMMIT
2703
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2704
- SQL (0.1ms) BEGIN
2705
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'Test', 6, '2010-02-02 01:10:40', 17)
2706
- SQL (0.6ms) COMMIT
2707
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 17 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2708
- SQL (0.1ms) BEGIN
2709
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 0 WHERE `id` = 10
2710
- SQL (0.7ms) COMMIT
2711
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2712
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2713
- User Load (0.3ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2714
- SQL (0.1ms) BEGIN
2715
- Comment Create (0.2ms) INSERT INTO `comments` (`created_at`, `commentable_type`, `body`, `commentable_id`, `updated_at`, `author_id`) VALUES('2010-02-02 01:10:40', 'MessageThread', 'Tester', 6, '2010-02-02 01:10:40', 18)
2716
- SQL (0.5ms) COMMIT
2717
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.receiver_id = 18 AND `recipients`.receiver_type = 'User' AND (message_thread_id = 6)) ORDER BY has_read ASC, created_at DESC LIMIT 1
2718
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 6) ORDER BY has_read ASC, created_at DESC
2719
- SQL (0.1ms) BEGIN
2720
- Recipient Update (0.2ms) UPDATE `recipients` SET `updated_at` = '2010-02-02 01:10:40', `has_read` = 0 WHERE `id` = 9
2721
- SQL (0.5ms) COMMIT
2722
- MessageThread Load (0.2ms) SELECT * FROM `message_threads` WHERE (`message_threads`.`id` = 6) 
2723
- User Load (0.1ms) SELECT * FROM `users` WHERE (`users`.`id` = 16) 
2724
- User Load (0.2ms) SELECT DISTINCT `users`.* FROM `users` INNER JOIN `comments` ON `users`.id = `comments`.author_id WHERE ((`comments`.commentable_type = 'MessageThread') AND (`comments`.commentable_id = 6)) 
2725
- SQL (0.1ms) BEGIN
2726
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Mike', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2727
- SQL (0.5ms) COMMIT
2728
- SQL (0.1ms) BEGIN
2729
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('John', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2730
- SQL (0.6ms) COMMIT
2731
- SQL (0.1ms) BEGIN
2732
- User Create (0.1ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES('Sky', '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2733
- SQL (0.6ms) COMMIT
2734
- SQL (0.1ms) BEGIN
2735
- MessageThread Create (0.2ms) INSERT INTO `message_threads` (`created_at`, `title`, `body`, `updated_at`, `private_thread`, `author_id`) VALUES('2010-02-02 01:10:40', 'Title 6', 'Body 6', '2010-02-02 01:10:40', 1, 19)
2736
- SQL (0.5ms) COMMIT
2737
- SQL (0.1ms) BEGIN
2738
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 20, '2010-02-02 01:10:40', NULL, 7)
2739
- SQL (0.6ms) COMMIT
2740
- SQL (0.1ms) BEGIN
2741
- Recipient Create (0.2ms) INSERT INTO `recipients` (`receiver_type`, `created_at`, `receiver_id`, `updated_at`, `has_read`, `message_thread_id`) VALUES('User', '2010-02-02 01:10:40', 21, '2010-02-02 01:10:40', NULL, 7)
2742
- SQL (0.9ms) COMMIT
2743
- Recipient Load (0.3ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2744
- SQL (0.1ms) BEGIN
2745
- SQL (0.1ms) COMMIT
2746
- SQL (0.1ms) BEGIN
2747
- User Create (0.2ms) INSERT INTO `users` (`name`, `created_at`, `updated_at`) VALUES(NULL, '2010-02-02 01:10:40', '2010-02-02 01:10:40')
2748
- SQL (0.7ms) COMMIT
2749
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2750
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` IN (20,21)) 
2751
- Recipient Load (0.2ms) SELECT * FROM `recipients` WHERE (`recipients`.message_thread_id = 7) ORDER BY has_read ASC, created_at DESC
2752
- User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` IN (20,21))