wupee 1.1.4 → 2.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8360592f9d8ddfc32655c9b34b443d5f7e3970c
4
- data.tar.gz: ee9a2595a9fd5b07a087be26dda6132ef42ffc35
3
+ metadata.gz: 4277221ab932fab41fba033d5b5d0b86fe9ffb81
4
+ data.tar.gz: 5638a7a9a039e55d1841f0b1b56a37256da5197e
5
5
  SHA512:
6
- metadata.gz: 459137088deae5143986d42a6f2b204fa002d4097066b80032d3ff3b833ea6ab6a6a5701d659b52531e312b837fd14bb5c73ee850601cf00eaaf9cf0727db285
7
- data.tar.gz: c9aabb35479bb228c7e4586ea8b08ff49c55b50ad769bdabc0996d8b9e6fb11e82798b74ab49bcc639aa66efc7229668d0902997cc57680e1f480fb569cedad5
6
+ metadata.gz: 2702fdf37b2ac16d955c685ce7f39f373e7c51556f34a98552c71bc49d1a00cf0b234b0d55d218c23c53ccb4739f7c79d9582a0e9aa32bb9779fd67a439da312
7
+ data.tar.gz: dc4385d99c0540f8d46ef31bef45b0907957565880bc8880c1a0e3115f95e35303eb215a939fb61f06e4885f59c234a63fb02c90f89d680ddf4d6cc055b24eab
@@ -1,33 +1,34 @@
1
1
  module Wupee
2
2
  class Api::NotificationsController < ApplicationController
3
- before_action :set_notification, only: [:show, :update]
4
-
5
3
  def index
6
- if params[:is_read]
7
- @notifications = current_user.notifications.where(is_read: params[:is_read] == "true")
8
- else
9
- @notifications = current_user.notifications
4
+ scopes = params[:scopes].present? ? params[:scopes].split(',') : []
5
+ scopes = ['read', 'unread', 'wanted', 'unwanted', 'ordered'] & scopes
6
+
7
+ @notifications = current_user.notifications
8
+
9
+ scopes.each do |scope|
10
+ @notifications = @notifications.public_send(scope)
10
11
  end
11
12
  end
12
13
 
13
14
  def show
15
+ @notification = find_notification
14
16
  end
15
17
 
16
- def update
18
+ def mark_as_read
19
+ @notification = find_notification
17
20
  @notification.mark_as_read
18
21
  render :show
19
22
  end
20
23
 
21
- def update_all
22
- current_user.notifications.where(is_read: false).find_each do |n|
23
- n.mark_as_read
24
- end
24
+ def mark_all_as_read
25
+ current_user.notifications.unread.update_all(is_read: true)
25
26
  head :no_content
26
27
  end
27
28
 
28
29
  private
29
- def set_notification
30
- @notification = current_user.notifications.find(params[:id])
31
- end
30
+ def find_notification
31
+ current_user.notifications.find(params[:id])
32
+ end
32
33
  end
33
34
  end
@@ -2,20 +2,26 @@ module Wupee
2
2
  class NotificationsMailer < ActionMailer::Base
3
3
  after_action :mark_notification_as_sent
4
4
 
5
- def send_mail_for(notification, subject_interpolations = {}, locals_interpolations = {})
5
+ def send_mail_for(notification, subject_interpolations = {}, locals_interpolations = {}, headers = {})
6
6
  @notification = notification
7
7
  @receiver = notification.receiver
8
8
  @attached_object = notification.attached_object
9
9
  @subject_interpolations = subject_interpolations
10
10
  @locals = locals_interpolations
11
+ @headers = headers
11
12
 
12
13
  if !respond_to?(notification.notification_type.name)
13
14
  class_eval %Q{
14
15
  def #{notification.notification_type.name}
15
- mail to: @receiver.email,
16
- subject: t('wupee.email_subjects.#{notification.notification_type.name}', @subject_interpolations),
17
- template_name: '#{notification.notification_type.name}',
18
- content_type: 'text/html'
16
+ mail_args = {
17
+ to: @receiver.email,
18
+ subject: t('wupee.email_subjects.#{notification.notification_type.name}', @subject_interpolations),
19
+ template_name: '#{notification.notification_type.name}',
20
+ content_type: 'text/html'
21
+ }
22
+
23
+ mail_args = mail_args.merge(@headers)
24
+ mail mail_args
19
25
  end
20
26
  }
21
27
  end
@@ -4,13 +4,6 @@ module Wupee
4
4
 
5
5
  included do
6
6
  has_many :notifications, as: :receiver, dependent: :destroy, class_name: "Wupee::Notification"
7
- has_many :notification_type_configurations, as: :receiver, dependent: :destroy, class_name: "Wupee::NotificationTypeConfiguration"
8
-
9
- after_create do
10
- Wupee::NotificationType.pluck(:id).each do |notification_type_id|
11
- Wupee::NotificationTypeConfiguration.create!(notification_type_id: notification_type_id, receiver: self)
12
- end
13
- end
14
7
  end
15
8
  end
16
9
  end
@@ -3,10 +3,13 @@ class Wupee::Notification < ActiveRecord::Base
3
3
  belongs_to :attached_object, polymorphic: true
4
4
  belongs_to :notification_type, class_name: "Wupee::NotificationType"
5
5
 
6
- validates_presence_of :receiver,
7
- :notification_type
6
+ validates :receiver, presence: true
7
+ validates :notification_type, presence: true
8
8
 
9
+ scope :read, -> { where(is_read: true) }
9
10
  scope :unread, -> { where(is_read: false) }
11
+ scope :wanted, -> { where(is_wanted: true) }
12
+ scope :unwanted, -> { where(is_wanted: false) }
10
13
  scope :ordered, -> { order(created_at: :desc) }
11
14
 
12
15
  def mark_as_read
@@ -2,18 +2,5 @@ class Wupee::NotificationType < ActiveRecord::Base
2
2
  validates :name, presence: true
3
3
  validates :name, uniqueness: true
4
4
 
5
- has_many :notification_type_configurations, foreign_key: :notification_type_id, dependent: :destroy
6
5
  has_many :notifications, foreign_key: :notification_type_id, dependent: :destroy
7
-
8
- def self.create_configurations_for(*receivers)
9
- class_eval do
10
- receivers.each do |receiver|
11
- after_create do
12
- receiver.to_s.constantize.pluck(:id).each do |receiver_id|
13
- Wupee::NotificationTypeConfiguration.create!(notification_type: self, receiver_type: receiver, receiver_id: receiver_id)
14
- end
15
- end
16
- end
17
- end
18
- end
19
6
  end
data/config/routes.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  Wupee::Engine.routes.draw do
2
2
  namespace :api, defaults: { format: :json } do
3
- resources :notifications, only: [:index, :show, :update] do
4
- match :update_all, path: '/', via: [:put, :patch], on: :collection
3
+ resources :notifications, only: [:index, :show] do
4
+ patch :mark_as_read, on: :member
5
+ patch :mark_all_as_read, on: :collection
5
6
  end
6
7
  end
7
8
  end
@@ -1,16 +1,17 @@
1
1
  class CreateWupeeNotifications < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :wupee_notifications do |t|
4
- t.references :receiver, polymorphic: true
5
- t.references :attached_object, polymorphic: true
6
- t.belongs_to :notification_type
4
+ t.references :receiver, polymorphic: true, index: { name: 'idx_wupee_notifications_on_receiver_id' }
5
+ t.references :attached_object, polymorphic: true, index: { name: 'idx_wupee_notifications_on_attached_object_id' }
7
6
  t.integer :notification_type_id
8
7
  t.boolean :is_read, default: false
9
8
  t.boolean :is_sent, default: false
9
+ t.boolean :is_wanted, default: true
10
10
 
11
11
  t.timestamps null: false
12
12
  end
13
13
 
14
+ add_index :wupee_notifications, :notification_type_id, name: 'idx_wupee_notifications_on_notification_type_id'
14
15
  add_foreign_key :wupee_notifications, :wupee_notification_types, column: :notification_type_id
15
16
  end
16
17
  end
@@ -1,3 +1,14 @@
1
1
  Wupee.mailer = NotificationsMailer
2
2
  Wupee.deliver_when = :now
3
- Wupee.receivers = 'User'
3
+
4
+ # uncomment and implement your logic here to avoid/permit email sending to your users
5
+ # leave it commented if you always want your users received emails
6
+ # Wupee.email_sending_rule = Proc.new do |receiver, notification_type|
7
+ # # logic goes here, returning a boolean
8
+ # end
9
+
10
+ # uncomment and implement your logic here to avoid/permit email sending to your users
11
+ # leave it commented if you always want your users received notifications
12
+ # Wupee.notification_sending_rule = Proc.new do |receiver, notification_type|
13
+ # # logic goes here, returning a boolean
14
+ # end
data/lib/tasks/wupee.rake CHANGED
@@ -1,16 +1,2 @@
1
1
  namespace :wupee do
2
- desc "generate Wupee::NotificationTypeConfiguration objects for given Wupee::NotificationType name and for all receivers of given class (default to User)"
3
- task :generate_notification_type_configurations, [:notification_type_name, :receiver_klass] => [:environment] do |t, args|
4
-
5
- unless notification_type = Wupee::NotificationType.find_by(name: args[:notification_type_name])
6
- warn "Wupee::NotificationType with name #{args[:notification_type_name]} not found."
7
- next
8
- end
9
-
10
- receiver_klass = args[:receiver_klass] || 'User'
11
-
12
- receiver_klass.constantize.pluck(:id).each do |id|
13
- Wupee::NotificationTypeConfiguration.create!(receiver_type: receiver_klass, receiver_id: id, notification_type_id: notification_type.id)
14
- end
15
- end
16
2
  end
data/lib/wupee.rb CHANGED
@@ -2,17 +2,11 @@ require "wupee/engine"
2
2
  require "wupee/notifier"
3
3
 
4
4
  module Wupee
5
- mattr_accessor :mailer, :deliver_when
6
- mattr_reader :receivers
5
+ mattr_accessor :mailer, :deliver_when, :email_sending_rule, :notification_sending_rule
7
6
 
8
7
  def self.notify(opts = {}, &block)
9
8
  wupee_notifier = Wupee::Notifier.new(opts)
10
9
  yield wupee_notifier if block_given?
11
10
  wupee_notifier.execute
12
11
  end
13
-
14
- def self.receivers=(klass)
15
- @@receivers = klass
16
- Wupee::NotificationType.create_configurations_for(klass)
17
- end
18
12
  end
@@ -1,6 +1,6 @@
1
1
  module Wupee
2
2
  class Notifier
3
- attr_reader :deliver_when, :attached_object, :receiver_s, :notification_type, :subject_vars, :locals
3
+ attr_reader :deliver_when, :attached_object, :receiver_s, :notification_type, :subject_vars, :locals, :headers, :config_scope
4
4
 
5
5
  def initialize(opts = {})
6
6
  @attached_object = opts[:attached_object]
@@ -11,10 +11,18 @@ module Wupee
11
11
  @subject_vars = opts[:subject_vars] || {}
12
12
  @locals = opts[:locals] || {}
13
13
 
14
+ @headers = opts[:headers] || {}
15
+
16
+ @config_scope = opts[:config_scope]
17
+
14
18
  @deliver_when = opts[:deliver]
15
19
  notif_type(opts[:notif_type]) if opts[:notif_type]
16
20
  end
17
21
 
22
+ def headers(headers = {})
23
+ @headers = headers
24
+ end
25
+
18
26
  def notif_type(notif_type)
19
27
  if notif_type.is_a?(Wupee::NotificationType)
20
28
  @notification_type = notif_type
@@ -51,24 +59,29 @@ module Wupee
51
59
  raise ArgumentError.new('receiver or receivers is missing') if @receiver_s.nil?
52
60
  raise ArgumentError.new('notif_type is missing') if @notification_type.nil?
53
61
 
54
- notif_type_configs = Wupee::NotificationTypeConfiguration.includes(:receiver).where(receiver: @receiver_s, notification_type: @notification_type)
62
+ notifications = []
63
+ @receiver_s.each do |receiver|
64
+ notification = Wupee::Notification.new(receiver: receiver, notification_type: @notification_type, attached_object: @attached_object)
65
+
66
+ notification.is_wanted = false unless send_notification?(receiver, @notification_type)
55
67
 
56
- notif_type_configs.each do |notif_type_config|
57
- notification = Wupee::Notification.new(receiver: notif_type_config.receiver, notification_type: @notification_type, attached_object: @attached_object)
58
- notification.is_read = true unless notif_type_config.wants_notification?
59
68
  notification.save!
60
69
 
70
+ notifications << notification
71
+
61
72
  subject_interpolations = interpolate_vars(@subject_vars, notification)
62
73
  locals_interpolations = interpolate_vars(@locals, notification)
63
74
 
64
- send_email(notification, subject_interpolations, locals_interpolations) if notif_type_config.wants_email?
75
+ send_email(notification, subject_interpolations, locals_interpolations) if send_email?(receiver, @notification_type)
65
76
  end
77
+
78
+ notifications
66
79
  end
67
80
 
68
81
  private
69
82
  def send_email(notification, subject_interpolations, locals_interpolations)
70
83
  deliver_method = "deliver_#{@deliver_when || Wupee.deliver_when}"
71
- Wupee.mailer.send_mail_for(notification, subject_interpolations, locals_interpolations).send(deliver_method)
84
+ Wupee.mailer.send_mail_for(notification, subject_interpolations, locals_interpolations, @headers).send(deliver_method)
72
85
  end
73
86
 
74
87
  def interpolate_vars(vars, notification)
@@ -77,11 +90,35 @@ module Wupee
77
90
  vars_interpolated[key] = if value.kind_of?(Proc)
78
91
  notification.instance_eval(&value)
79
92
  else
80
- value.to_s
93
+ value
81
94
  end
82
95
  end
83
96
 
84
97
  vars_interpolated
85
98
  end
99
+
100
+ def send_notification?(receiver, notification_type)
101
+ if !Wupee.notification_sending_rule.nil?
102
+ if Wupee.notification_sending_rule.is_a?(Proc)
103
+ Wupee.notification_sending_rule.call(receiver, notification_type)
104
+ else
105
+ Wupee.notification_sending_rule
106
+ end
107
+ else
108
+ true
109
+ end
110
+ end
111
+
112
+ def send_email?(receiver, notification_type)
113
+ if !Wupee.email_sending_rule.nil?
114
+ if Wupee.email_sending_rule.is_a?(Proc)
115
+ Wupee.email_sending_rule.call(receiver, notification_type)
116
+ else
117
+ Wupee.email_sending_rule
118
+ end
119
+ else
120
+ true
121
+ end
122
+ end
86
123
  end
87
124
  end
data/lib/wupee/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Wupee
2
- VERSION = "1.1.4"
2
+ VERSION = "2.0.0.beta1"
3
3
  end
@@ -29,6 +29,11 @@ RSpec.describe Wupee::Api::NotificationsController, type: :controller do
29
29
  expect(json[0]['id']).to eq notification.id
30
30
  expect(json[0]['message']['subject']).to eq "subject"
31
31
  end
32
+
33
+ it "should accept scopes as param" do
34
+ get :index, format: :json, scopes: "unwanted"
35
+ expect(json.size).to eq 0
36
+ end
32
37
  end
33
38
 
34
39
  describe 'GET show json' do
@@ -45,7 +50,7 @@ RSpec.describe Wupee::Api::NotificationsController, type: :controller do
45
50
  render_views
46
51
 
47
52
  it "should mark as read" do
48
- put :update, id: notification.id, format: :json
53
+ patch :mark_as_read, id: notification.id, format: :json
49
54
  expect(json['is_read']).to eq true
50
55
  end
51
56
  end
@@ -54,7 +59,7 @@ RSpec.describe Wupee::Api::NotificationsController, type: :controller do
54
59
  render_views
55
60
 
56
61
  it "should all notification of user mark as read" do
57
- put :update_all, format: :json
62
+ patch :mark_all_as_read, format: :json
58
63
  expect(notification.reload.is_read).to eq true
59
64
  end
60
65
  end
@@ -1,3 +1,10 @@
1
1
  Wupee.mailer = NotificationsMailer
2
2
  Wupee.deliver_when = :now
3
- Wupee.receivers = 'User'
3
+
4
+ Wupee.email_sending_rule = Proc.new do |receiver, notification_type|
5
+ true
6
+ end
7
+
8
+ Wupee.notification_sending_rule = Proc.new do |receiver, notification_type|
9
+ true
10
+ end
Binary file
@@ -26,18 +26,6 @@ ActiveRecord::Schema.define(version: 20151029113107) do
26
26
  t.datetime "updated_at", null: false
27
27
  end
28
28
 
29
- create_table "wupee_notification_type_configurations", force: :cascade do |t|
30
- t.integer "notification_type_id"
31
- t.integer "receiver_id"
32
- t.string "receiver_type"
33
- t.integer "value", default: 0
34
- t.datetime "created_at", null: false
35
- t.datetime "updated_at", null: false
36
- end
37
-
38
- add_index "wupee_notification_type_configurations", ["notification_type_id"], name: "idx_wupee_notif_type_config_on_notification_type_id"
39
- add_index "wupee_notification_type_configurations", ["receiver_type", "receiver_id"], name: "idx_wupee_notif_typ_config_on_receiver_type_and_receiver_id"
40
-
41
29
  create_table "wupee_notification_types", force: :cascade do |t|
42
30
  t.string "name"
43
31
  t.datetime "created_at", null: false
@@ -54,8 +42,13 @@ ActiveRecord::Schema.define(version: 20151029113107) do
54
42
  t.integer "notification_type_id"
55
43
  t.boolean "is_read", default: false
56
44
  t.boolean "is_sent", default: false
45
+ t.boolean "is_wanted", default: true
57
46
  t.datetime "created_at", null: false
58
47
  t.datetime "updated_at", null: false
59
48
  end
60
49
 
50
+ add_index "wupee_notifications", ["attached_object_type", "attached_object_id"], name: "idx_wupee_notifications_on_attached_object_id"
51
+ add_index "wupee_notifications", ["notification_type_id"], name: "idx_wupee_notifications_on_notification_type_id"
52
+ add_index "wupee_notifications", ["receiver_type", "receiver_id"], name: "idx_wupee_notifications_on_receiver_id"
53
+
61
54
  end
Binary file
@@ -2314,3 +2314,807 @@ Content-Transfer-Encoding: 7bit
2314
2314
  {:bla=&gt;&quot;test&quot;}
2315
2315
  {:test=&gt;&quot;lapute&quot;}
2316
2316
 
2317
+ Wupee::NotificationType Load (8.0ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2318
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2319
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2320
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2321
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2322
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2323
+ Wupee::NotificationType Load (0.5ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2324
+ Wupee::NotificationType Load (0.2ms) SELECT "wupee_notification_types".* FROM "wupee_notification_types" ORDER BY "wupee_notification_types"."id" DESC LIMIT 1
2325
+ User Load (0.4ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2326
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2327
+ Wupee::Notification Load (0.6ms) SELECT "wupee_notifications".* FROM "wupee_notifications" WHERE "wupee_notifications"."receiver_id" = ? AND "wupee_notifications"."receiver_type" = ? [["receiver_id", 1], ["receiver_type", "User"]]
2328
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2329
+ Wupee::Notification Load (0.2ms) SELECT "wupee_notifications".* FROM "wupee_notifications" WHERE "wupee_notifications"."receiver_id" = ? AND "wupee_notifications"."receiver_type" = ? AND "wupee_notifications"."is_read" = ? [["receiver_id", 1], ["receiver_type", "User"], ["is_read", "false"]]
2330
+ User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT 1
2331
+ Wupee::Notification Load (0.2ms) SELECT "wupee_notifications".* FROM "wupee_notifications" WHERE "wupee_notifications"."receiver_id" = ? AND "wupee_notifications"."receiver_type" = ? AND "wupee_notifications"."is_read" = ? [["receiver_id", 1], ["receiver_type", "User"], ["is_read", "f"]]
2332
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2333
+  (0.1ms) select sqlite_version(*)
2334
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2335
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2336
+ Migrating to CreateUsers (20150213150625)
2337
+  (0.1ms) begin transaction
2338
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2339
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2340
+  (0.8ms) commit transaction
2341
+ Migrating to CreateMessages (20150213152846)
2342
+  (0.1ms) begin transaction
2343
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2344
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2345
+  (0.8ms) commit transaction
2346
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2347
+ ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
2348
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2349
+  (9.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2350
+  (0.1ms) select sqlite_version(*)
2351
+  (1.4ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2352
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2353
+ Migrating to CreateUsers (20150213150625)
2354
+  (0.1ms) begin transaction
2355
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2356
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2357
+  (0.8ms) commit transaction
2358
+ Migrating to CreateMessages (20150213152846)
2359
+  (0.1ms) begin transaction
2360
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2361
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2362
+  (0.8ms) commit transaction
2363
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2364
+  (0.4ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
2365
+  (9.2ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2366
+  (0.1ms) select sqlite_version(*)
2367
+  (1.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2368
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2369
+ Migrating to CreateUsers (20150213150625)
2370
+  (0.1ms) begin transaction
2371
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2372
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2373
+  (0.9ms) commit transaction
2374
+ Migrating to CreateMessages (20150213152846)
2375
+  (0.1ms) begin transaction
2376
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2377
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2378
+  (0.7ms) commit transaction
2379
+ Migrating to CreateWupeeNotificationTypes (20170217114154)
2380
+  (0.1ms) begin transaction
2381
+  (0.3ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2382
+  (0.3ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2383
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217114154"]]
2384
+  (1.0ms) commit transaction
2385
+ Migrating to CreateWupeeNotifications (20170217114155)
2386
+  (0.1ms) begin transaction
2387
+  (0.9ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2388
+  (0.4ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2389
+  (0.2ms)  SELECT sql
2390
+ FROM sqlite_master
2391
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2392
+ UNION ALL
2393
+ SELECT sql
2394
+ FROM sqlite_temp_master
2395
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2396
+ 
2397
+  (0.3ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2398
+  (0.1ms)  SELECT sql
2399
+ FROM sqlite_master
2400
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2401
+ UNION ALL
2402
+ SELECT sql
2403
+ FROM sqlite_temp_master
2404
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2405
+ 
2406
+  (0.1ms) SELECT sql
2407
+ FROM sqlite_master
2408
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2409
+ UNION ALL
2410
+ SELECT sql
2411
+ FROM sqlite_temp_master
2412
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2413
+
2414
+  (0.2ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2415
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217114155"]]
2416
+  (2.9ms) commit transaction
2417
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2418
+  (0.1ms)  SELECT sql
2419
+ FROM sqlite_master
2420
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2421
+ UNION ALL
2422
+ SELECT sql
2423
+ FROM sqlite_temp_master
2424
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2425
+ 
2426
+  (0.1ms) SELECT sql
2427
+ FROM sqlite_master
2428
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2429
+ UNION ALL
2430
+ SELECT sql
2431
+ FROM sqlite_temp_master
2432
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2433
+
2434
+  (0.2ms)  SELECT sql
2435
+ FROM sqlite_master
2436
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2437
+ UNION ALL
2438
+ SELECT sql
2439
+ FROM sqlite_temp_master
2440
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2441
+ 
2442
+  (0.1ms) SELECT sql
2443
+ FROM sqlite_master
2444
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2445
+ UNION ALL
2446
+ SELECT sql
2447
+ FROM sqlite_temp_master
2448
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2449
+
2450
+  (1.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
2451
+  (9.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2452
+  (0.1ms) select sqlite_version(*)
2453
+  (1.2ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2454
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2455
+ Migrating to CreateUsers (20150213150625)
2456
+  (0.1ms) begin transaction
2457
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2458
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2459
+  (0.9ms) commit transaction
2460
+ Migrating to CreateMessages (20150213152846)
2461
+  (0.0ms) begin transaction
2462
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2463
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2464
+  (0.8ms) commit transaction
2465
+ Migrating to CreateWupeeNotificationTypes (20170217114154)
2466
+  (0.0ms) begin transaction
2467
+  (0.3ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2468
+  (0.3ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2469
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217114154"]]
2470
+  (1.0ms) commit transaction
2471
+ Migrating to CreateWupeeNotifications (20170217114155)
2472
+  (0.1ms) begin transaction
2473
+  (0.4ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2474
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2475
+  (0.1ms)  SELECT sql
2476
+ FROM sqlite_master
2477
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2478
+ UNION ALL
2479
+ SELECT sql
2480
+ FROM sqlite_temp_master
2481
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2482
+ 
2483
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2484
+  (0.0ms)  SELECT sql
2485
+ FROM sqlite_master
2486
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2487
+ UNION ALL
2488
+ SELECT sql
2489
+ FROM sqlite_temp_master
2490
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2491
+ 
2492
+  (0.0ms) SELECT sql
2493
+ FROM sqlite_master
2494
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2495
+ UNION ALL
2496
+ SELECT sql
2497
+ FROM sqlite_temp_master
2498
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2499
+
2500
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2501
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217114155"]]
2502
+  (0.7ms) commit transaction
2503
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2504
+  (0.2ms)  SELECT sql
2505
+ FROM sqlite_master
2506
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2507
+ UNION ALL
2508
+ SELECT sql
2509
+ FROM sqlite_temp_master
2510
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2511
+ 
2512
+  (0.1ms) SELECT sql
2513
+ FROM sqlite_master
2514
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2515
+ UNION ALL
2516
+ SELECT sql
2517
+ FROM sqlite_temp_master
2518
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2519
+
2520
+  (0.1ms)  SELECT sql
2521
+ FROM sqlite_master
2522
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2523
+ UNION ALL
2524
+ SELECT sql
2525
+ FROM sqlite_temp_master
2526
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2527
+ 
2528
+  (0.1ms) SELECT sql
2529
+ FROM sqlite_master
2530
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2531
+ UNION ALL
2532
+ SELECT sql
2533
+ FROM sqlite_temp_master
2534
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2535
+
2536
+  (1.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2537
+  (0.1ms) select sqlite_version(*)
2538
+  (2.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2539
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2540
+ Migrating to CreateUsers (20150213150625)
2541
+  (0.1ms) begin transaction
2542
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2543
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2544
+  (1.1ms) commit transaction
2545
+ Migrating to CreateMessages (20150213152846)
2546
+  (0.1ms) begin transaction
2547
+  (0.5ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2548
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2549
+  (0.9ms) commit transaction
2550
+ Migrating to CreateWupeeNotificationTypes (20170217114154)
2551
+  (0.1ms) begin transaction
2552
+  (0.5ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2553
+  (0.5ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2554
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217114154"]]
2555
+  (1.1ms) commit transaction
2556
+ Migrating to CreateWupeeNotifications (20170217114155)
2557
+  (0.1ms) begin transaction
2558
+  (0.5ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2559
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2560
+  (0.1ms)  SELECT sql
2561
+ FROM sqlite_master
2562
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2563
+ UNION ALL
2564
+ SELECT sql
2565
+ FROM sqlite_temp_master
2566
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2567
+ 
2568
+  (0.2ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2569
+  (0.1ms)  SELECT sql
2570
+ FROM sqlite_master
2571
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2572
+ UNION ALL
2573
+ SELECT sql
2574
+ FROM sqlite_temp_master
2575
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2576
+ 
2577
+  (0.0ms) SELECT sql
2578
+ FROM sqlite_master
2579
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2580
+ UNION ALL
2581
+ SELECT sql
2582
+ FROM sqlite_temp_master
2583
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2584
+
2585
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2586
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217114155"]]
2587
+  (0.8ms) commit transaction
2588
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2589
+  (0.4ms)  SELECT sql
2590
+ FROM sqlite_master
2591
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2592
+ UNION ALL
2593
+ SELECT sql
2594
+ FROM sqlite_temp_master
2595
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2596
+ 
2597
+  (0.4ms) SELECT sql
2598
+ FROM sqlite_master
2599
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2600
+ UNION ALL
2601
+ SELECT sql
2602
+ FROM sqlite_temp_master
2603
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2604
+
2605
+  (0.1ms)  SELECT sql
2606
+ FROM sqlite_master
2607
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2608
+ UNION ALL
2609
+ SELECT sql
2610
+ FROM sqlite_temp_master
2611
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2612
+ 
2613
+  (0.1ms) SELECT sql
2614
+ FROM sqlite_master
2615
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2616
+ UNION ALL
2617
+ SELECT sql
2618
+ FROM sqlite_temp_master
2619
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2620
+
2621
+  (1.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2622
+  (1.0ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2623
+  (0.9ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2624
+  (0.1ms) select sqlite_version(*)
2625
+  (1.0ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2626
+  (0.9ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2627
+  (0.8ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2628
+  (0.1ms) SELECT sql
2629
+ FROM sqlite_master
2630
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2631
+ UNION ALL
2632
+ SELECT sql
2633
+ FROM sqlite_temp_master
2634
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2635
+
2636
+  (0.8ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2637
+  (0.1ms) SELECT sql
2638
+ FROM sqlite_master
2639
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2640
+ UNION ALL
2641
+ SELECT sql
2642
+ FROM sqlite_temp_master
2643
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2644
+
2645
+  (0.1ms)  SELECT sql
2646
+ FROM sqlite_master
2647
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2648
+ UNION ALL
2649
+ SELECT sql
2650
+ FROM sqlite_temp_master
2651
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2652
+ 
2653
+  (0.8ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2654
+  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2655
+  (0.8ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2656
+  (0.1ms) SELECT version FROM "schema_migrations"
2657
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20170217114155')
2658
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150213150625')
2659
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20150213152846')
2660
+  (0.9ms) INSERT INTO "schema_migrations" (version) VALUES ('20170217114154')
2661
+  (0.8ms) INSERT INTO "schema_migrations" (version) VALUES ('20151029113100')
2662
+  (0.7ms) INSERT INTO "schema_migrations" (version) VALUES ('20151029113107')
2663
+  (1.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2664
+  (0.1ms) select sqlite_version(*)
2665
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2666
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2667
+ Migrating to CreateUsers (20150213150625)
2668
+  (0.1ms) begin transaction
2669
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2670
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2671
+  (0.7ms) commit transaction
2672
+ Migrating to CreateMessages (20150213152846)
2673
+  (0.1ms) begin transaction
2674
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2675
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2676
+  (0.7ms) commit transaction
2677
+ Migrating to CreateWupeeNotificationTypes (20151029113100)
2678
+  (0.1ms) begin transaction
2679
+  (0.3ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2680
+  (0.4ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2681
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113100"]]
2682
+  (1.0ms) commit transaction
2683
+ Migrating to CreateWupeeNotifications (20151029113107)
2684
+  (0.1ms) begin transaction
2685
+  (0.4ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2686
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2687
+  (0.1ms)  SELECT sql
2688
+ FROM sqlite_master
2689
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2690
+ UNION ALL
2691
+ SELECT sql
2692
+ FROM sqlite_temp_master
2693
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2694
+ 
2695
+  (0.2ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2696
+  (0.1ms)  SELECT sql
2697
+ FROM sqlite_master
2698
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2699
+ UNION ALL
2700
+ SELECT sql
2701
+ FROM sqlite_temp_master
2702
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2703
+ 
2704
+  (0.0ms) SELECT sql
2705
+ FROM sqlite_master
2706
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2707
+ UNION ALL
2708
+ SELECT sql
2709
+ FROM sqlite_temp_master
2710
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2711
+
2712
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2713
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113107"]]
2714
+  (0.8ms) commit transaction
2715
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2716
+  (0.1ms)  SELECT sql
2717
+ FROM sqlite_master
2718
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2719
+ UNION ALL
2720
+ SELECT sql
2721
+ FROM sqlite_temp_master
2722
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2723
+ 
2724
+  (0.2ms) SELECT sql
2725
+ FROM sqlite_master
2726
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2727
+ UNION ALL
2728
+ SELECT sql
2729
+ FROM sqlite_temp_master
2730
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2731
+
2732
+  (0.1ms)  SELECT sql
2733
+ FROM sqlite_master
2734
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2735
+ UNION ALL
2736
+ SELECT sql
2737
+ FROM sqlite_temp_master
2738
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2739
+ 
2740
+  (0.1ms) SELECT sql
2741
+ FROM sqlite_master
2742
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2743
+ UNION ALL
2744
+ SELECT sql
2745
+ FROM sqlite_temp_master
2746
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2747
+
2748
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
2749
+ Migrating to CreateWupeeNotificationTypes (20170217143614)
2750
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
2751
+ Migrating to CreateWupeeNotificationTypes (20170217143614)
2752
+  (0.1ms) begin transaction
2753
+  (0.2ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2754
+ SQLite3::SQLException: table "wupee_notification_types" already exists: CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2755
+  (0.0ms) rollback transaction
2756
+  (1.1ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2757
+  (0.1ms) select sqlite_version(*)
2758
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2759
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2760
+ Migrating to CreateUsers (20150213150625)
2761
+  (0.1ms) begin transaction
2762
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2763
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2764
+  (0.8ms) commit transaction
2765
+ Migrating to CreateMessages (20150213152846)
2766
+  (0.1ms) begin transaction
2767
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2768
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2769
+  (0.7ms) commit transaction
2770
+ Migrating to CreateWupeeNotificationTypes (20170217143614)
2771
+  (0.0ms) begin transaction
2772
+  (0.3ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2773
+  (0.3ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2774
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217143614"]]
2775
+  (0.8ms) commit transaction
2776
+ Migrating to CreateWupeeNotifications (20170217143615)
2777
+  (0.0ms) begin transaction
2778
+  (0.3ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2779
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2780
+  (0.1ms)  SELECT sql
2781
+ FROM sqlite_master
2782
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2783
+ UNION ALL
2784
+ SELECT sql
2785
+ FROM sqlite_temp_master
2786
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2787
+ 
2788
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2789
+  (0.1ms)  SELECT sql
2790
+ FROM sqlite_master
2791
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2792
+ UNION ALL
2793
+ SELECT sql
2794
+ FROM sqlite_temp_master
2795
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2796
+ 
2797
+  (0.1ms) SELECT sql
2798
+ FROM sqlite_master
2799
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2800
+ UNION ALL
2801
+ SELECT sql
2802
+ FROM sqlite_temp_master
2803
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2804
+
2805
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2806
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170217143615"]]
2807
+  (0.7ms) commit transaction
2808
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2809
+  (0.1ms)  SELECT sql
2810
+ FROM sqlite_master
2811
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2812
+ UNION ALL
2813
+ SELECT sql
2814
+ FROM sqlite_temp_master
2815
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2816
+ 
2817
+  (0.1ms) SELECT sql
2818
+ FROM sqlite_master
2819
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2820
+ UNION ALL
2821
+ SELECT sql
2822
+ FROM sqlite_temp_master
2823
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2824
+
2825
+  (0.1ms)  SELECT sql
2826
+ FROM sqlite_master
2827
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2828
+ UNION ALL
2829
+ SELECT sql
2830
+ FROM sqlite_temp_master
2831
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2832
+ 
2833
+  (0.1ms) SELECT sql
2834
+ FROM sqlite_master
2835
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2836
+ UNION ALL
2837
+ SELECT sql
2838
+ FROM sqlite_temp_master
2839
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2840
+
2841
+  (0.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
2842
+  (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2843
+  (0.2ms) select sqlite_version(*)
2844
+  (0.9ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
2845
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2846
+ Migrating to CreateUsers (20150213150625)
2847
+  (0.1ms) begin transaction
2848
+  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2849
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2850
+  (0.8ms) commit transaction
2851
+ Migrating to CreateMessages (20150213152846)
2852
+  (0.1ms) begin transaction
2853
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2854
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2855
+  (0.8ms) commit transaction
2856
+ Migrating to CreateWupeeNotificationTypes (20151029113100)
2857
+  (0.1ms) begin transaction
2858
+  (0.3ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2859
+  (0.3ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2860
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113100"]]
2861
+  (0.9ms) commit transaction
2862
+ Migrating to CreateWupeeNotifications (20151029113107)
2863
+  (0.1ms) begin transaction
2864
+  (0.3ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_id" integer, "receiver_type" varchar, "attached_object_id" integer, "attached_object_type" varchar, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) 
2865
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2866
+  (0.1ms)  SELECT sql
2867
+ FROM sqlite_master
2868
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2869
+ UNION ALL
2870
+ SELECT sql
2871
+ FROM sqlite_temp_master
2872
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2873
+ 
2874
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2875
+  (0.1ms)  SELECT sql
2876
+ FROM sqlite_master
2877
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2878
+ UNION ALL
2879
+ SELECT sql
2880
+ FROM sqlite_temp_master
2881
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2882
+ 
2883
+  (0.1ms) SELECT sql
2884
+ FROM sqlite_master
2885
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2886
+ UNION ALL
2887
+ SELECT sql
2888
+ FROM sqlite_temp_master
2889
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2890
+
2891
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2892
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113107"]]
2893
+  (0.8ms) commit transaction
2894
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2895
+  (0.1ms)  SELECT sql
2896
+ FROM sqlite_master
2897
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2898
+ UNION ALL
2899
+ SELECT sql
2900
+ FROM sqlite_temp_master
2901
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2902
+ 
2903
+  (0.1ms) SELECT sql
2904
+ FROM sqlite_master
2905
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2906
+ UNION ALL
2907
+ SELECT sql
2908
+ FROM sqlite_temp_master
2909
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
2910
+
2911
+  (0.1ms)  SELECT sql
2912
+ FROM sqlite_master
2913
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2914
+ UNION ALL
2915
+ SELECT sql
2916
+ FROM sqlite_temp_master
2917
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2918
+ 
2919
+  (0.1ms) SELECT sql
2920
+ FROM sqlite_master
2921
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2922
+ UNION ALL
2923
+ SELECT sql
2924
+ FROM sqlite_temp_master
2925
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2926
+
2927
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
2928
+  (1.3ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2929
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
2930
+  (0.1ms) begin transaction
2931
+ SQL (0.3ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2017-02-17 15:03:26 UTC], ["updated_at", 2017-02-17 15:03:26 UTC]]
2932
+  (1.3ms) commit transaction
2933
+ ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
2934
+  (0.2ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", :environment]]
2935
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
2936
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", :environment]]
2937
+ ActiveRecord::SchemaMigration Load (0.0ms) SELECT "schema_migrations".* FROM "schema_migrations"
2938
+  (0.1ms) SELECT "ar_internal_metadata"."value" FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? [["key", :environment]]
2939
+  (16.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
2940
+  (2.8ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2941
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2942
+ Migrating to CreateUsers (20150213150625)
2943
+  (0.1ms) begin transaction
2944
+  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2945
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
2946
+  (2.9ms) commit transaction
2947
+ Migrating to CreateMessages (20150213152846)
2948
+  (0.1ms) begin transaction
2949
+  (0.9ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2950
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
2951
+  (3.3ms) commit transaction
2952
+ Migrating to CreateWupeeNotificationTypes (20151029113100)
2953
+  (0.3ms) begin transaction
2954
+  (4.4ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2955
+  (0.4ms) select sqlite_version(*)
2956
+  (26.2ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
2957
+ SQL (2.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113100"]]
2958
+  (3.5ms) commit transaction
2959
+ Migrating to CreateWupeeNotifications (20151029113107)
2960
+  (0.1ms) begin transaction
2961
+  (5.2ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_type" varchar, "receiver_id" integer, "attached_object_type" varchar, "attached_object_id" integer, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
2962
+  (0.5ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
2963
+  (1.7ms)  SELECT sql
2964
+ FROM sqlite_master
2965
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2966
+ UNION ALL
2967
+ SELECT sql
2968
+ FROM sqlite_temp_master
2969
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2970
+ 
2971
+  (5.2ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
2972
+  (0.1ms)  SELECT sql
2973
+ FROM sqlite_master
2974
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2975
+ UNION ALL
2976
+ SELECT sql
2977
+ FROM sqlite_temp_master
2978
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
2979
+ 
2980
+  (0.2ms)  SELECT sql
2981
+ FROM sqlite_master
2982
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2983
+ UNION ALL
2984
+ SELECT sql
2985
+ FROM sqlite_temp_master
2986
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
2987
+ 
2988
+  (2.3ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
2989
+ SQL (1.8ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113107"]]
2990
+  (11.3ms) commit transaction
2991
+ ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
2992
+  (0.1ms) begin transaction
2993
+ SQL (1.1ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2017-02-17 15:03:31 UTC], ["updated_at", 2017-02-17 15:03:31 UTC]]
2994
+  (1.6ms) commit transaction
2995
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
2996
+  (0.1ms)  SELECT sql
2997
+ FROM sqlite_master
2998
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
2999
+ UNION ALL
3000
+ SELECT sql
3001
+ FROM sqlite_temp_master
3002
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
3003
+ 
3004
+  (0.1ms)  SELECT sql
3005
+ FROM sqlite_master
3006
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
3007
+ UNION ALL
3008
+ SELECT sql
3009
+ FROM sqlite_temp_master
3010
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
3011
+ 
3012
+  (0.1ms)  SELECT sql
3013
+ FROM sqlite_master
3014
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
3015
+ UNION ALL
3016
+ SELECT sql
3017
+ FROM sqlite_temp_master
3018
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
3019
+ 
3020
+  (0.1ms)  SELECT sql
3021
+ FROM sqlite_master
3022
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3023
+ UNION ALL
3024
+ SELECT sql
3025
+ FROM sqlite_temp_master
3026
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3027
+ 
3028
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
3029
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
3030
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3031
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations"
3032
+  (3.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY)
3033
+  (1.0ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3034
+ ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
3035
+ Migrating to CreateUsers (20150213150625)
3036
+  (0.1ms) begin transaction
3037
+  (0.4ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3038
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213150625"]]
3039
+  (0.7ms) commit transaction
3040
+ Migrating to CreateMessages (20150213152846)
3041
+  (0.1ms) begin transaction
3042
+  (0.3ms) CREATE TABLE "messages" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "body" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3043
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20150213152846"]]
3044
+  (0.8ms) commit transaction
3045
+ Migrating to CreateWupeeNotificationTypes (20151029113100)
3046
+  (0.1ms) begin transaction
3047
+  (0.4ms) CREATE TABLE "wupee_notification_types" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3048
+  (0.4ms) select sqlite_version(*)
3049
+  (0.6ms) CREATE UNIQUE INDEX "index_wupee_notification_types_on_name" ON "wupee_notification_types" ("name")
3050
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113100"]]
3051
+  (1.0ms) commit transaction
3052
+ Migrating to CreateWupeeNotifications (20151029113107)
3053
+  (0.0ms) begin transaction
3054
+  (0.4ms) CREATE TABLE "wupee_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "receiver_type" varchar, "receiver_id" integer, "attached_object_type" varchar, "attached_object_id" integer, "notification_type_id" integer, "is_read" boolean DEFAULT 'f', "is_sent" boolean DEFAULT 'f', "is_wanted" boolean DEFAULT 't', "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
3055
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_receiver_id" ON "wupee_notifications" ("receiver_type", "receiver_id")
3056
+  (0.0ms)  SELECT sql
3057
+ FROM sqlite_master
3058
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3059
+ UNION ALL
3060
+ SELECT sql
3061
+ FROM sqlite_temp_master
3062
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3063
+ 
3064
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_attached_object_id" ON "wupee_notifications" ("attached_object_type", "attached_object_id")
3065
+  (0.1ms)  SELECT sql
3066
+ FROM sqlite_master
3067
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
3068
+ UNION ALL
3069
+ SELECT sql
3070
+ FROM sqlite_temp_master
3071
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
3072
+ 
3073
+  (0.1ms)  SELECT sql
3074
+ FROM sqlite_master
3075
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3076
+ UNION ALL
3077
+ SELECT sql
3078
+ FROM sqlite_temp_master
3079
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3080
+ 
3081
+  (0.1ms) CREATE INDEX "idx_wupee_notifications_on_notification_type_id" ON "wupee_notifications" ("notification_type_id")
3082
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20151029113107"]]
3083
+  (0.7ms) commit transaction
3084
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]]
3085
+  (0.1ms) begin transaction
3086
+ SQL (0.7ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2017-02-17 15:26:16 UTC], ["updated_at", 2017-02-17 15:26:16 UTC]]
3087
+  (0.6ms) commit transaction
3088
+ ActiveRecord::SchemaMigration Load (0.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
3089
+  (0.2ms)  SELECT sql
3090
+ FROM sqlite_master
3091
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
3092
+ UNION ALL
3093
+ SELECT sql
3094
+ FROM sqlite_temp_master
3095
+ WHERE name='index_wupee_notification_types_on_name' AND type='index'
3096
+ 
3097
+  (0.2ms)  SELECT sql
3098
+ FROM sqlite_master
3099
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
3100
+ UNION ALL
3101
+ SELECT sql
3102
+ FROM sqlite_temp_master
3103
+ WHERE name='idx_wupee_notifications_on_notification_type_id' AND type='index'
3104
+ 
3105
+  (0.2ms)  SELECT sql
3106
+ FROM sqlite_master
3107
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
3108
+ UNION ALL
3109
+ SELECT sql
3110
+ FROM sqlite_temp_master
3111
+ WHERE name='idx_wupee_notifications_on_attached_object_id' AND type='index'
3112
+ 
3113
+  (0.1ms)  SELECT sql
3114
+ FROM sqlite_master
3115
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3116
+ UNION ALL
3117
+ SELECT sql
3118
+ FROM sqlite_temp_master
3119
+ WHERE name='idx_wupee_notifications_on_receiver_id' AND type='index'
3120
+