news_feed 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  class NewsFeedEvent < ActiveRecord::Base
2
2
  belongs_to :recipient, :polymorphic => true
3
- attr_accessible :text, :object_id, :object_type, :event_type,
3
+ attr_accessible :text, :event_object_id, :event_object_type, :event_type,
4
4
  :sender_id, :sender_type, :recipient_id, :recipient_type
5
5
 
6
6
  validates_presence_of :recipient_id, :recipient_type
@@ -1,19 +1,14 @@
1
- module NewsFeed
2
- module Generators
3
- class InstallGenerator < Rails::Generators::Base
4
- source_root File.expand_path('../templates', __FILE__)
5
-
6
- desc "Copies the news feed locale file and news feed event file to your application"
7
-
8
- def copy_locale
9
- copy_file "../../../config/locales/en_news_feed.yml", "config/locales/en_news_feed.yml"
10
- end
11
-
12
- def copy_news_feed_events
13
- copy_file "../../../lib/news_feed/news_feed_events.rb", "lib/news_feed/news_feed_events.rb"
14
- end
1
+ class NewsFeedGenerator < Rails::Generators::Base
2
+ source_root File.expand_path('..', __FILE__)
3
+
4
+ desc "Copies the news feed locale file and news feed event file to your application"
5
+
6
+ def copy_locale
7
+ copy_file "../../../config/locales/en_news_feed.yml", "config/locales/en_news_feed.yml"
8
+ end
9
+
10
+ def copy_news_feed_events
11
+ copy_file "../../../lib/news_feed/news_feed_events.rb", "lib/news_feed/news_feed_events.rb"
12
+ end
15
13
 
16
- end
17
- end
18
- end
19
-
14
+ end
@@ -11,6 +11,7 @@ module NewsFeed
11
11
  has_many :news_feed_events, foreign_key: 'recipient_id', dependent: :delete_all
12
12
 
13
13
  include NewsFeedInstanceMethods
14
+ require Rails.root.join('lib/news_feed/news_feed_events')
14
15
  include NewsFeedEvents
15
16
  end
16
17
  end
@@ -34,8 +35,8 @@ module NewsFeed
34
35
 
35
36
  options = {
36
37
  text: text,
37
- object_type: self.class.name,
38
- object_id: self.id,
38
+ event_object_type: self.class.name,
39
+ event_object_id: self.id,
39
40
  event_type: event_name,
40
41
  sender_id: actor.id,
41
42
  sender_type: actor.class.name,
@@ -1,3 +1,3 @@
1
1
  module NewsFeed
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/news_feed.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'news_feed/acts_as_news_feedable'
2
- require 'news_feed/news_feed_events'
2
+ #require Rails.root.join('lib/news_feed/news_feed_events')
3
3
  require 'app/model/news_feed_event'
4
4
  module NewsFeed
5
5
 
Binary file
@@ -3,8 +3,8 @@ class InsertNewsFeedEvents < ActiveRecord::Migration
3
3
  def self.up
4
4
  create_table :news_feed_events, :force => true do |t|
5
5
  t.text :text
6
- t.integer :object_id
7
- t.string :object_type
6
+ t.integer :event_object_id
7
+ t.string :event_object_type
8
8
  t.string :event_type
9
9
  t.integer :sender_id
10
10
  t.integer :sender_type
@@ -29,15 +29,15 @@ ActiveRecord::Schema.define(:version => 20120807021300) do
29
29
 
30
30
  create_table "news_feed_events", :force => true do |t|
31
31
  t.text "text"
32
- t.integer "object_id"
33
- t.string "object_type"
32
+ t.integer "event_object_id"
33
+ t.string "event_object_type"
34
34
  t.string "event_type"
35
35
  t.integer "sender_id"
36
36
  t.integer "sender_type"
37
37
  t.integer "recipient_id"
38
38
  t.string "recipient_type"
39
- t.datetime "created_at", :null => false
40
- t.datetime "updated_at", :null => false
39
+ t.datetime "created_at", :null => false
40
+ t.datetime "updated_at", :null => false
41
41
  end
42
42
 
43
43
  create_table "users", :force => true do |t|
Binary file
@@ -0,0 +1,30 @@
1
+ module NewsFeed
2
+ module NewsFeedEvents
3
+ def generate_text(event_name, actor_name, object_class, object_title, recipient_name = nil)
4
+ # event_name is what the cases will check for
5
+ # actor_name is the user object that performs the action
6
+ # object_class is the class of the object of interest
7
+ # recipient_name can include the recipient name
8
+
9
+ case event_name
10
+ when :Create
11
+ I18n.t('news_feeds.create_object', actor: actor_name.to_s, object_class: object_class,
12
+ object_name: object_title)
13
+ when :Update
14
+ I18n.t('news_feeds.update_object', actor: actor_name.to_s, object_class: object_class,
15
+ object_name: object_title)
16
+ when :Delete
17
+ I18n.t('news_feeds.delete_object', actor: actor_name.to_s, object_class: object_class,
18
+ object_name: object_title)
19
+ when :Send
20
+ I18n.t('news_feeds.send_object', actor: actor_name.to_s, object_class: object_class,
21
+ object_name: object_title, recipient_name: recipient_name)
22
+ else
23
+ raise "event_name is undefined"
24
+ end
25
+
26
+
27
+ end
28
+ end
29
+
30
+ end
@@ -1,194 +1,113 @@
1
+ Connecting to database specified by database.yml
2
+  (0.1ms) select sqlite_version(*)
3
+  (2.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
4
+  (0.0ms) PRAGMA index_list("schema_migrations")
5
+  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
6
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
7
+ Connecting to database specified by database.yml
8
+ Connecting to database specified by database.yml
9
+ Connecting to database specified by database.yml
10
+ Connecting to database specified by database.yml
11
+ Connecting to database specified by database.yml
12
+ Connecting to database specified by database.yml
13
+ Connecting to database specified by database.yml
14
+ Connecting to database specified by database.yml
15
+ Connecting to database specified by database.yml
16
+ Connecting to database specified by database.yml
17
+ Connecting to database specified by database.yml
18
+ Connecting to database specified by database.yml
19
+ Connecting to database specified by database.yml
20
+ Connecting to database specified by database.yml
21
+ Connecting to database specified by database.yml
22
+ Connecting to database specified by database.yml
23
+ Connecting to database specified by database.yml
24
+ Connecting to database specified by database.yml
25
+ Connecting to database specified by database.yml
26
+ Connecting to database specified by database.yml
27
+ Connecting to database specified by database.yml
28
+ Connecting to database specified by database.yml
29
+ Connecting to database specified by database.yml
30
+ Connecting to database specified by database.yml
31
+ Connecting to database specified by database.yml
32
+ Connecting to database specified by database.yml
33
+ Connecting to database specified by database.yml
34
+ Connecting to database specified by database.yml
35
+ Connecting to database specified by database.yml
36
+ Connecting to database specified by database.yml
37
+ Connecting to database specified by database.yml
38
+ Connecting to database specified by database.yml
39
+ Connecting to database specified by database.yml
1
40
  Connecting to database specified by database.yml
2
41
  Connecting to database specified by database.yml
42
+ Connecting to database specified by database.yml
43
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
44
+ Connecting to database specified by database.yml
45
+ Connecting to database specified by database.yml
46
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
47
+ Connecting to database specified by database.yml
3
48
  Connecting to database specified by database.yml
4
49
   (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
5
50
  Migrating to CreateUsers (20120806195421)
51
+  (0.1ms) select sqlite_version(*)
52
+  (0.1ms) begin transaction
53
+  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
54
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806195421')
55
+  (38.6ms) commit transaction
6
56
  Migrating to CreateNewsFeed (20120806213224)
57
+  (0.1ms) begin transaction
58
+  (0.4ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime)
59
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806213224')
60
+  (4.0ms) commit transaction
7
61
  Migrating to CreateMessages (20120806220426)
62
+  (0.1ms) begin transaction
63
+  (0.4ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
64
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806220426')
65
+  (4.1ms) commit transaction
8
66
  Migrating to InsertNewsFeedEvents (20120807021300)
9
-  (0.0ms) select sqlite_version(*)
10
67
   (0.1ms) begin transaction
11
-  (10.1ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime)
12
-  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120807021300')
13
-  (2.2ms) commit transaction
14
-  (0.2ms) select sqlite_version(*)
15
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
68
+  (0.3ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
69
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120807021300')
70
+  (3.5ms) commit transaction
71
+  (0.4ms) select sqlite_version(*)
72
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
16
73
   (0.0ms) PRAGMA index_list("messages")
17
74
   (0.0ms) PRAGMA index_list("news_feed")
18
75
   (0.0ms) PRAGMA index_list("news_feed_events")
19
76
   (0.0ms) PRAGMA index_list("users")
20
77
  Connecting to database specified by database.yml
21
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
22
78
  Connecting to database specified by database.yml
23
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
24
-  (0.2ms) select sqlite_version(*)
25
-  (2.2ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
26
-  (1.0ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "timestamp" datetime)
27
-  (1.2ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) 
28
-  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
29
-  (1.3ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
30
-  (0.0ms) PRAGMA index_list("schema_migrations")
31
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
32
-  (0.1ms) SELECT version FROM "schema_migrations"
33
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120807021300')
34
-  (1.4ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806220426')
35
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806195421')
36
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806213224')
37
79
  Connecting to database specified by database.yml
38
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
39
80
  Connecting to database specified by database.yml
40
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
41
-  (6.8ms) select sqlite_version(*)
42
-  (8.9ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
43
-  (1.1ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "timestamp" datetime)
44
-  (1.5ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) 
45
-  (1.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
46
-  (3.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
47
-  (0.0ms) PRAGMA index_list("schema_migrations")
48
-  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
49
-  (0.1ms) SELECT version FROM "schema_migrations"
50
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120807021300')
51
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806220426')
52
-  (6.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806195421')
53
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806213224')
54
- Connecting to database specified by database.yml
55
-  (0.2ms) select sqlite_version(*)
56
-  (2.9ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
57
-  (0.0ms) PRAGMA index_list("schema_migrations")
58
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
59
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
60
- Migrating to CreateUsers (20120806195421)
61
-  (0.0ms) begin transaction
62
-  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
63
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806195421')
64
-  (1.4ms) commit transaction
65
- Migrating to CreateNewsFeed (20120806213224)
66
-  (0.0ms) begin transaction
67
-  (0.3ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) 
68
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806213224')
69
-  (1.0ms) commit transaction
70
- Migrating to CreateMessages (20120806220426)
71
-  (0.0ms) begin transaction
72
-  (0.4ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
73
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806220426')
74
-  (1.1ms) commit transaction
75
- Migrating to InsertNewsFeedEvents (20120807021300)
76
-  (0.0ms) begin transaction
77
-  (0.3ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "timestamp" datetime) 
78
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120807021300')
79
-  (1.9ms) commit transaction
80
-  (0.4ms) select sqlite_version(*)
81
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
82
-  (0.0ms) PRAGMA index_list("messages")
83
-  (0.0ms) PRAGMA index_list("news_feed")
84
-  (0.1ms) PRAGMA index_list("news_feed_events")
85
-  (0.0ms) PRAGMA index_list("users")
86
81
  Connecting to database specified by database.yml
87
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
88
-  (0.3ms) select sqlite_version(*)
89
-  (3.5ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
90
-  (1.3ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime)
91
-  (1.3ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "timestamp" datetime) 
92
-  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
93
-  (1.4ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
94
-  (0.0ms) PRAGMA index_list("schema_migrations")
95
-  (1.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
96
-  (0.1ms) SELECT version FROM "schema_migrations"
97
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120807021300')
98
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806220426')
99
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806195421')
100
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806213224')
101
- Connecting to database specified by database.yml
102
-  (0.2ms) select sqlite_version(*)
103
-  (2.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
104
-  (0.0ms) PRAGMA index_list("schema_migrations")
105
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
106
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
107
- Migrating to CreateUsers (20120806195421)
108
-  (0.1ms) begin transaction
109
-  (0.5ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
110
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806195421')
111
-  (1.7ms) commit transaction
112
- Migrating to CreateNewsFeed (20120806213224)
113
-  (0.0ms) begin transaction
114
-  (0.3ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) 
115
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806213224')
116
-  (1.4ms) commit transaction
117
- Migrating to CreateMessages (20120806220426)
118
-  (0.1ms) begin transaction
119
-  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
120
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806220426')
121
-  (1.6ms) commit transaction
122
- Migrating to InsertNewsFeedEvents (20120807021300)
123
-  (0.0ms) begin transaction
124
-  (0.3ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255)) 
125
-  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120807021300')
126
-  (2.0ms) commit transaction
127
-  (0.4ms) select sqlite_version(*)
128
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
129
-  (0.0ms) PRAGMA index_list("messages")
130
-  (0.0ms) PRAGMA index_list("news_feed")
131
-  (0.0ms) PRAGMA index_list("news_feed_events")
132
-  (0.0ms) PRAGMA index_list("users")
133
- Connecting to database specified by database.yml
134
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
135
-  (0.2ms) select sqlite_version(*)
136
-  (2.1ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
137
-  (1.1ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime)
138
-  (1.5ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255)) 
139
-  (1.2ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
140
-  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
141
-  (0.0ms) PRAGMA index_list("schema_migrations")
142
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
143
-  (0.1ms) SELECT version FROM "schema_migrations"
144
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120807021300')
145
-  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806220426')
146
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806195421')
147
-  (1.2ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806213224')
148
82
  Connecting to database specified by database.yml
149
83
   (0.1ms) select sqlite_version(*)
150
-  (5.0ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
84
+  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
151
85
   (0.0ms) PRAGMA index_list("schema_migrations")
152
-  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
86
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
153
87
   (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
154
88
  Migrating to CreateUsers (20120806195421)
155
89
   (0.1ms) begin transaction
156
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
90
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
157
91
   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806195421')
158
-  (1.5ms) commit transaction
92
+  (2.0ms) commit transaction
159
93
  Migrating to CreateNewsFeed (20120806213224)
160
94
   (0.0ms) begin transaction
161
95
   (0.3ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime) 
162
96
   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806213224')
163
-  (1.5ms) commit transaction
97
+  (1.2ms) commit transaction
164
98
  Migrating to CreateMessages (20120806220426)
165
-  (0.0ms) begin transaction
166
-  (0.2ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
99
+  (0.1ms) begin transaction
100
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
167
101
   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120806220426')
168
102
   (1.5ms) commit transaction
169
103
  Migrating to InsertNewsFeedEvents (20120807021300)
170
104
   (0.1ms) begin transaction
171
-  (0.4ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
105
+  (0.4ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "event_object_id" integer, "event_object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
172
106
   (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120807021300')
173
-  (1.8ms) commit transaction
174
-  (0.2ms) select sqlite_version(*)
107
+  (1.7ms) commit transaction
108
+  (0.4ms) select sqlite_version(*)
175
109
   (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
176
-  (0.0ms) PRAGMA index_list("messages")
110
+  (0.1ms) PRAGMA index_list("messages")
177
111
   (0.0ms) PRAGMA index_list("news_feed")
178
-  (0.0ms) PRAGMA index_list("news_feed_events")
112
+  (0.1ms) PRAGMA index_list("news_feed_events")
179
113
   (0.0ms) PRAGMA index_list("users")
180
- Connecting to database specified by database.yml
181
-  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
182
-  (0.4ms) select sqlite_version(*)
183
-  (2.5ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
184
-  (1.4ms) CREATE TABLE "news_feed" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "timestamp" datetime)
185
-  (1.8ms) CREATE TABLE "news_feed_events" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "text" text, "object_id" integer, "object_type" varchar(255), "event_type" varchar(255), "sender_id" integer, "sender_type" integer, "recipient_id" integer, "recipient_type" varchar(255), "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
186
-  (1.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
187
-  (2.5ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL) 
188
-  (0.0ms) PRAGMA index_list("schema_migrations")
189
-  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
190
-  (0.1ms) SELECT version FROM "schema_migrations"
191
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120807021300')
192
-  (1.3ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806220426')
193
-  (1.1ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806195421')
194
-  (1.0ms) INSERT INTO "schema_migrations" (version) VALUES ('20120806213224')