notifiable-rails 0.26.0 → 0.26.1

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: 9ad0d87bf1e334a466b905408b7f9dad2500f0aa
4
- data.tar.gz: 4cc64bf39c6a957796885aa43080c7284a5acfda
3
+ metadata.gz: 96d2eea79d8e0d96946ba2a72593dac2281074a5
4
+ data.tar.gz: 8b309f03bfc74a78f772a5e2736f492ceced0c8b
5
5
  SHA512:
6
- metadata.gz: aecfd5d39454935d7f48fa805acaa9f297806056fcb9235526ec986063b2c9af520a2a5f938c6943597156c3f00c83fad121ebc823163a50d48455433d77f612
7
- data.tar.gz: 97becf3d2c3d2012f681933503ef3c980af93b74a7e432b7316be4794e1fcd8812b12095b74a513f9e94857cf8eb9d2013e306344fe57d42f3aa7db1eba31f44
6
+ metadata.gz: dd59ee70d70bed9ea3715c9f8d42bc657ecc7f84644ed0d7f5e2fd1662ef654f2e3e0c2b95f34b603a4909c6c844b09bb3c1d4f29153bdfdef6d4c9dbf37edfd
7
+ data.tar.gz: 899e8497825a01fcb378e9171734d0a60061cd6fdf836f8784618b1efe2044306d526f4ecf372787381ee926db5db2012f22fc602f1ca11f98c287f2bf6137f1
@@ -0,0 +1,5 @@
1
+ class AddLastErrorMessageToNotifications < ActiveRecord::Migration
2
+ def change
3
+ add_column :notifiable_notifications, :last_error_message, :text
4
+ end
5
+ end
@@ -8,9 +8,15 @@ module Notifiable
8
8
 
9
9
  has_many :notification_statuses, :class_name => 'Notifiable::NotificationStatus', :dependent => :destroy
10
10
 
11
- def batch
12
- yield(self)
13
- close
11
+ def batch
12
+ begin
13
+ yield(self)
14
+ update(last_error_message: nil)
15
+ rescue Exception => e
16
+ update(last_error_message: e.message)
17
+ ensure
18
+ close
19
+ end
14
20
  end
15
21
 
16
22
  def add_device_token(d)
@@ -1,3 +1,3 @@
1
1
  module Notifiable
2
- VERSION = "0.26.0"
2
+ VERSION = "0.26.1"
3
3
  end
@@ -1,6 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Notifiable::Notification do
3
+ describe Notifiable::Notification do
4
+ subject { create(:notification) }
5
+
4
6
  describe "#add_device_token" do
5
7
  context "single token" do
6
8
  subject(:notification) { create(:notification, app: create(:app, save_notification_statuses: true)) }
@@ -40,7 +42,6 @@ describe Notifiable::Notification do
40
42
  end
41
43
 
42
44
  describe "#destroy" do
43
- subject { create(:notification) }
44
45
  let!(:s) { create(:notification_status, :notification => subject) }
45
46
 
46
47
  before(:each) { subject.destroy }
@@ -48,4 +49,17 @@ describe Notifiable::Notification do
48
49
  it { expect(Notifiable::NotificationStatus.count).to eq 0 }
49
50
  end
50
51
 
52
+ describe "#batch" do
53
+
54
+ context 'throws exception' do
55
+ before(:each) do
56
+ subject.batch do
57
+ raise 'SSL error occured'
58
+ end
59
+ end
60
+ it { expect(subject.last_error_message).to eq 'SSL error occured' }
61
+ end
62
+
63
+ end
64
+
51
65
  end
@@ -2,8 +2,6 @@ postgis: &postgis
2
2
  adapter: postgis
3
3
  host: localhost
4
4
  port: 5432
5
- username: matt
6
- password:
7
5
 
8
6
 
9
7
  development:
@@ -11,7 +11,7 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20170116212641) do
14
+ ActiveRecord::Schema.define(version: 20180302212641) do
15
15
 
16
16
  # These are extensions that must be enabled in order to support this database
17
17
  enable_extension "plpgsql"
@@ -54,6 +54,7 @@ ActiveRecord::Schema.define(version: 20170116212641) do
54
54
  t.datetime "created_at"
55
55
  t.datetime "updated_at"
56
56
  t.integer "badge_count"
57
+ t.text "last_error_message"
57
58
  end
58
59
 
59
60
  create_table "notifiable_statuses", force: :cascade do |t|
@@ -1,284 +1,172 @@
1
-  (0.8ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
2
-  (0.1ms) select sqlite_version(*)
3
-  (0.6ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
4
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
1
+  (3.5ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
2
+  (1.5ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
3
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
5
4
  Migrating to CreateNotifiableApps (20131210115648)
6
-  (0.1ms) begin transaction
7
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
8
-  (0.3ms) CREATE TABLE "notifiable_apps" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "configuration" text, "created_at" datetime, "updated_at" datetime)
9
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115648"]]
10
-  (0.6ms) commit transaction
5
+  (0.2ms) BEGIN
6
+ DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/mattbrooke-smith/Development/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
7
+  (5.2ms) CREATE TABLE "notifiable_apps" ("id" serial primary key, "name" character varying, "configuration" text, "created_at" timestamp, "updated_at" timestamp) 
8
+ SQL (0.5ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115648"]]
9
+  (0.6ms) COMMIT
11
10
  Migrating to CreateNotifiableDeviceTokens (20131210115649)
12
-  (0.1ms) begin transaction
13
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
14
-  (0.3ms) CREATE TABLE "notifiable_device_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "token" varchar, "provider" varchar, "locale" varchar, "is_valid" boolean DEFAULT 't', "user_id" integer, "app_id" integer, "created_at" datetime, "updated_at" datetime)
15
-  (0.1ms) CREATE UNIQUE INDEX "index_notifiable_device_tokens_on_token" ON "notifiable_device_tokens" ("token")
16
-  (0.1ms) SELECT sql
17
- FROM sqlite_master
18
- WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
19
- UNION ALL
20
- SELECT sql
21
- FROM sqlite_temp_master
22
- WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
23
-
24
-  (0.1ms) CREATE INDEX "index_notifiable_device_tokens_on_user_id" ON "notifiable_device_tokens" ("user_id")
25
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115649"]]
26
-  (0.5ms) commit transaction
11
+  (0.4ms) BEGIN
12
+ DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/mattbrooke-smith/Development/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
13
+  (4.3ms) CREATE TABLE "notifiable_device_tokens" ("id" serial primary key, "token" character varying, "provider" character varying, "locale" character varying, "is_valid" boolean DEFAULT 't', "user_alias" character varying, "app_id" integer, "created_at" timestamp, "updated_at" timestamp) 
14
+  (1.0ms) CREATE INDEX "index_notifiable_device_tokens_on_user_alias" ON "notifiable_device_tokens" ("user_alias")
15
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115649"]]
16
+  (0.6ms) COMMIT
27
17
  Migrating to CreateNotifiableNotifications (20131210115650)
28
-  (0.0ms) begin transaction
29
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:12)
30
-  (0.3ms) CREATE TABLE "notifiable_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
31
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115650"]]
32
-  (0.4ms) commit transaction
33
- Migrating to CreateNotifiableLocalizedNotifications (20131210115651)
34
-  (0.0ms) begin transaction
35
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115651_create_notifiable_localized_notifications.rb:18)
36
-  (0.2ms) CREATE TABLE "notifiable_localized_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message" text, "params" text, "locale" varchar, "notification_id" integer, "created_at" datetime, "updated_at" datetime) 
37
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115651"]]
38
-  (0.4ms) commit transaction
18
+  (0.3ms) BEGIN
19
+ DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/mattbrooke-smith/Development/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:23)
20
+  (4.5ms) CREATE TABLE "notifiable_notifications" ("id" serial primary key, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "message" text, "parameters" text, "sound" character varying, "identifier" character varying, "expiry" timestamp, "content_available" boolean, "mutable_content" boolean, "created_at" timestamp, "updated_at" timestamp)
21
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115650"]]
22
+  (0.5ms) COMMIT
39
23
  Migrating to CreateNotifiableStatuses (20131210115652)
40
-  (0.1ms) begin transaction
41
-  (0.3ms) CREATE TABLE "notifiable_statuses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "localized_notification_id" integer, "device_token_id" integer, "status" integer, "created_at" datetime) 
42
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115652"]]
43
-  (0.5ms) commit transaction
24
+  (0.3ms) BEGIN
25
+  (3.4ms) CREATE TABLE "notifiable_statuses" ("id" serial primary key, "notification_id" integer, "device_token_id" integer, "status" integer, "created_at" timestamp)
26
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115652"]]
27
+  (0.5ms) COMMIT
44
28
  Migrating to AddNameToNotifiableDeviceTokens (20131210115653)
45
-  (0.0ms) begin transaction
46
-  (0.3ms) ALTER TABLE "notifiable_device_tokens" ADD "name" varchar
47
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115653"]]
48
-  (0.6ms) commit transaction
49
- Migrating to AddPropertiesToLocalizedNotifications (20131210115654)
50
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
51
- Migrating to AddPropertiesToLocalizedNotifications (20131210115654)
52
-  (3.0ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
53
-  (0.2ms) select sqlite_version(*)
54
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
29
+  (0.3ms) BEGIN
30
+  (2.7ms) ALTER TABLE "notifiable_device_tokens" ADD "name" character varying
31
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115653"]]
32
+  (0.5ms) COMMIT
33
+ Migrating to AddBadgeCountToNotifiableNotifications (20161208221332)
34
+  (0.2ms) BEGIN
35
+  (0.4ms) ALTER TABLE "notifiable_notifications" ADD "badge_count" integer
36
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161208221332"]]
37
+  (0.4ms) COMMIT
38
+ Migrating to RemoveIsValidFromNotifiableDeviceTokens (20170108221332)
39
+  (0.1ms) BEGIN
40
+  (0.9ms) ALTER TABLE "notifiable_device_tokens" DROP "is_valid"
41
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170108221332"]]
42
+  (0.5ms) COMMIT
43
+ Migrating to AddAppIdTokenIndexToNotifiableDeviceTokens (20170108221432)
44
+  (0.1ms) BEGIN
45
+  (1.1ms) CREATE UNIQUE INDEX "index_notifiable_device_tokens_on_app_id_and_token" ON "notifiable_device_tokens" ("app_id", "token")
46
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170108221432"]]
47
+  (0.5ms) COMMIT
48
+ Migrating to AddLatLonToNotifiableDeviceTokens (20170116212641)
49
+  (0.1ms) BEGIN
50
+ SQL (0.3ms) CREATE EXTENSION IF NOT EXISTS "postgis"
51
+  (3.4ms) ALTER TABLE "notifiable_device_tokens" ADD "lonlat" geography(POINT,4326)
52
+ SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170116212641"]]
53
+  (0.5ms) COMMIT
54
+ Migrating to AddLastErrorMessageToNotifications (20180302212641)
55
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
+ Migrating to AddLastErrorMessageToNotifications (20180302212641)
57
+  (0.3ms) BEGIN
58
+  (1.0ms) ALTER TABLE "notifiable_notifications" ADD "last_error_message" text
59
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20180302212641"]]
60
+  (0.5ms) COMMIT
55
61
  ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
56
- Migrating to CreateNotifiableApps (20131210115648)
57
-  (0.1ms) begin transaction
58
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
59
-  (0.4ms) CREATE TABLE "notifiable_apps" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "configuration" text, "created_at" datetime, "updated_at" datetime)
60
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115648"]]
61
-  (0.5ms) commit transaction
62
- Migrating to CreateNotifiableDeviceTokens (20131210115649)
63
-  (0.1ms) begin transaction
64
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
65
-  (0.5ms) CREATE TABLE "notifiable_device_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "token" varchar, "provider" varchar, "locale" varchar, "is_valid" boolean DEFAULT 't', "user_id" integer, "app_id" integer, "created_at" datetime, "updated_at" datetime)
66
-  (0.1ms) CREATE UNIQUE INDEX "index_notifiable_device_tokens_on_token" ON "notifiable_device_tokens" ("token")
67
-  (0.1ms) SELECT sql
68
- FROM sqlite_master
69
- WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
70
- UNION ALL
71
- SELECT sql
72
- FROM sqlite_temp_master
73
- WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
74
-
75
-  (0.1ms) CREATE INDEX "index_notifiable_device_tokens_on_user_id" ON "notifiable_device_tokens" ("user_id")
76
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115649"]]
77
-  (0.5ms) commit transaction
78
- Migrating to CreateNotifiableNotifications (20131210115650)
79
-  (0.0ms) begin transaction
80
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:12)
81
-  (0.4ms) CREATE TABLE "notifiable_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "created_at" datetime, "updated_at" datetime) 
82
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115650"]]
83
-  (0.5ms) commit transaction
84
- Migrating to CreateNotifiableLocalizedNotifications (20131210115651)
85
-  (0.0ms) begin transaction
86
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115651_create_notifiable_localized_notifications.rb:18)
87
-  (0.3ms) CREATE TABLE "notifiable_localized_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "message" text, "params" text, "locale" varchar, "notification_id" integer, "created_at" datetime, "updated_at" datetime) 
88
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115651"]]
89
-  (0.5ms) commit transaction
90
- Migrating to CreateNotifiableStatuses (20131210115652)
91
-  (0.0ms) begin transaction
92
-  (0.2ms) CREATE TABLE "notifiable_statuses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "localized_notification_id" integer, "device_token_id" integer, "status" integer, "created_at" datetime) 
93
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115652"]]
94
-  (0.5ms) commit transaction
95
- Migrating to AddNameToNotifiableDeviceTokens (20131210115653)
96
-  (0.0ms) begin transaction
97
-  (0.3ms) ALTER TABLE "notifiable_device_tokens" ADD "name" varchar
98
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115653"]]
99
-  (0.4ms) commit transaction
100
- Migrating to AddPropertiesToLocalizedNotifications (20131210115654)
101
-  (0.0ms) begin transaction
102
-  (0.3ms) ALTER TABLE "notifiable_localized_notifications" ADD "props" text
103
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115654"]]
104
-  (0.5ms) commit transaction
105
- Migrating to CreateUsers (20131210115660)
106
-  (0.1ms) begin transaction
107
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL) 
108
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115660"]]
109
-  (0.6ms) commit transaction
110
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
111
-  (0.1ms)  SELECT sql
112
- FROM sqlite_master
113
- WHERE name='index_notifiable_device_tokens_on_user_id' AND type='index'
114
- UNION ALL
115
- SELECT sql
116
- FROM sqlite_temp_master
117
- WHERE name='index_notifiable_device_tokens_on_user_id' AND type='index'
62
+  (3.9ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
63
+ FROM pg_constraint c
64
+ JOIN pg_class t1 ON c.conrelid = t1.oid
65
+ JOIN pg_class t2 ON c.confrelid = t2.oid
66
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
67
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
68
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
69
+ WHERE c.contype = 'f'
70
+ AND t1.relname = 'notifiable_apps'
71
+ AND t3.nspname = ANY (current_schemas(false))
72
+ ORDER BY c.conname
118
73
  
119
-  (0.1ms) SELECT sql
120
- FROM sqlite_master
121
- WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
122
- UNION ALL
123
- SELECT sql
124
- FROM sqlite_temp_master
125
- WHERE name='index_notifiable_device_tokens_on_token' AND type='index'
74
+  (3.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
75
+ FROM pg_constraint c
76
+ JOIN pg_class t1 ON c.conrelid = t1.oid
77
+ JOIN pg_class t2 ON c.confrelid = t2.oid
78
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
79
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
80
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
81
+ WHERE c.contype = 'f'
82
+ AND t1.relname = 'notifiable_device_tokens'
83
+ AND t3.nspname = ANY (current_schemas(false))
84
+ ORDER BY c.conname
126
85
 
127
-  (2.6ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
128
-  (0.1ms) select sqlite_version(*)
129
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
130
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
131
- Migrating to CreateNotifiableApps (20131210115648)
132
-  (0.1ms) begin transaction
133
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
134
-  (0.4ms) CREATE TABLE "notifiable_apps" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "configuration" text, "created_at" datetime, "updated_at" datetime)
135
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115648"]]
136
-  (0.5ms) commit transaction
137
- Migrating to CreateNotifiableDeviceTokens (20131210115649)
138
-  (0.0ms) begin transaction
139
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
140
-  (0.3ms) CREATE TABLE "notifiable_device_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "token" varchar, "provider" varchar, "locale" varchar, "is_valid" boolean DEFAULT 't', "user_id" integer, "app_id" integer, "created_at" datetime, "updated_at" datetime)
141
-  (0.1ms) CREATE INDEX "index_notifiable_device_tokens_on_user_id" ON "notifiable_device_tokens" ("user_id")
142
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115649"]]
143
-  (0.4ms) commit transaction
144
- Migrating to CreateNotifiableNotifications (20131210115650)
145
-  (0.0ms) begin transaction
146
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:23)
147
-  (0.3ms) CREATE TABLE "notifiable_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "message" text, "parameters" text, "sound" varchar, "identifier" varchar, "expiry" datetime, "content_available" boolean, "mutable_content" boolean, "created_at" datetime, "updated_at" datetime) 
148
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115650"]]
149
-  (0.4ms) commit transaction
150
- Migrating to CreateNotifiableStatuses (20131210115652)
151
-  (0.0ms) begin transaction
152
-  (0.3ms) CREATE TABLE "notifiable_statuses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "notification_id" integer, "device_token_id" integer, "status" integer, "created_at" datetime) 
153
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115652"]]
154
-  (0.4ms) commit transaction
155
- Migrating to AddNameToNotifiableDeviceTokens (20131210115653)
156
-  (0.0ms) begin transaction
157
-  (0.3ms) ALTER TABLE "notifiable_device_tokens" ADD "name" varchar
158
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115653"]]
159
-  (0.5ms) commit transaction
160
- Migrating to CreateUsers (20131210115660)
161
-  (0.0ms) begin transaction
162
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL) 
163
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115660"]]
164
-  (0.5ms) commit transaction
165
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
166
-  (0.1ms)  SELECT sql
167
- FROM sqlite_master
168
- WHERE name='index_notifiable_device_tokens_on_user_id' AND type='index'
169
- UNION ALL
170
- SELECT sql
171
- FROM sqlite_temp_master
172
- WHERE name='index_notifiable_device_tokens_on_user_id' AND type='index'
173
- 
174
-  (0.9ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL) 
175
-  (0.1ms) select sqlite_version(*)
176
-  (0.7ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
177
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
178
- Migrating to CreateNotifiableApps (20131210115648)
179
-  (0.1ms) begin transaction
180
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
181
-  (0.4ms) CREATE TABLE "notifiable_apps" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "configuration" text, "created_at" datetime, "updated_at" datetime)
182
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115648"]]
183
-  (0.5ms) commit transaction
184
- Migrating to CreateNotifiableDeviceTokens (20131210115649)
185
-  (0.0ms) begin transaction
186
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
187
-  (0.3ms) CREATE TABLE "notifiable_device_tokens" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "token" varchar, "provider" varchar, "locale" varchar, "is_valid" boolean DEFAULT 't', "user_alias" varchar, "app_id" integer, "created_at" datetime, "updated_at" datetime)
188
-  (0.1ms) CREATE INDEX "index_notifiable_device_tokens_on_user_alias" ON "notifiable_device_tokens" ("user_alias")
189
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115649"]]
190
-  (0.5ms) commit transaction
191
- Migrating to CreateNotifiableNotifications (20131210115650)
192
-  (0.0ms) begin transaction
193
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:23)
194
-  (0.3ms) CREATE TABLE "notifiable_notifications" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "message" text, "parameters" text, "sound" varchar, "identifier" varchar, "expiry" datetime, "content_available" boolean, "mutable_content" boolean, "created_at" datetime, "updated_at" datetime) 
195
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115650"]]
196
-  (0.5ms) commit transaction
197
- Migrating to CreateNotifiableStatuses (20131210115652)
198
-  (0.0ms) begin transaction
199
-  (0.3ms) CREATE TABLE "notifiable_statuses" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "notification_id" integer, "device_token_id" integer, "status" integer, "created_at" datetime) 
200
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115652"]]
201
-  (0.5ms) commit transaction
202
- Migrating to AddNameToNotifiableDeviceTokens (20131210115653)
203
-  (0.1ms) begin transaction
204
-  (0.3ms) ALTER TABLE "notifiable_device_tokens" ADD "name" varchar
205
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115653"]]
206
-  (0.5ms) commit transaction
207
- Migrating to CreateUsers (20131210115660)
208
-  (0.1ms) begin transaction
209
-  (0.3ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "email" varchar DEFAULT '' NOT NULL) 
210
- SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20131210115660"]]
211
-  (0.5ms) commit transaction
212
- ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations"
213
-  (0.1ms)  SELECT sql
214
- FROM sqlite_master
215
- WHERE name='index_notifiable_device_tokens_on_user_alias' AND type='index'
216
- UNION ALL
217
- SELECT sql
218
- FROM sqlite_temp_master
219
- WHERE name='index_notifiable_device_tokens_on_user_alias' AND type='index'
86
+  (3.0ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
87
+ FROM pg_constraint c
88
+ JOIN pg_class t1 ON c.conrelid = t1.oid
89
+ JOIN pg_class t2 ON c.confrelid = t2.oid
90
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
91
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
92
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
93
+ WHERE c.contype = 'f'
94
+ AND t1.relname = 'notifiable_notifications'
95
+ AND t3.nspname = ANY (current_schemas(false))
96
+ ORDER BY c.conname
220
97
  
221
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
222
- Migrating to AddBadgeCountToNotifiableNotifications (20161208221332)
223
-  (3.0ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
224
-  (1.1ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
225
- ActiveRecord::SchemaMigration Load (0.3ms) SELECT "schema_migrations".* FROM "schema_migrations"
226
- Migrating to CreateNotifiableApps (20131210115648)
227
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
98
+  (5.2ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
99
+ FROM pg_constraint c
100
+ JOIN pg_class t1 ON c.conrelid = t1.oid
101
+ JOIN pg_class t2 ON c.confrelid = t2.oid
102
+ JOIN pg_attribute a1 ON a1.attnum = c.conkey[1] AND a1.attrelid = t1.oid
103
+ JOIN pg_attribute a2 ON a2.attnum = c.confkey[1] AND a2.attrelid = t2.oid
104
+ JOIN pg_namespace t3 ON c.connamespace = t3.oid
105
+ WHERE c.contype = 'f'
106
+ AND t1.relname = 'notifiable_statuses'
107
+ AND t3.nspname = ANY (current_schemas(false))
108
+ ORDER BY c.conname
109
+
110
+  (3.8ms) CREATE TABLE "schema_migrations" ("version" character varying NOT NULL) 
111
+  (2.0ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
112
+ ActiveRecord::SchemaMigration Load (0.5ms) SELECT "schema_migrations".* FROM "schema_migrations"
228
113
  Migrating to CreateNotifiableApps (20131210115648)
229
114
   (0.2ms) BEGIN
230
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
231
-  (5.2ms) CREATE TABLE "notifiable_apps" ("id" serial primary key, "name" character varying, "configuration" text, "created_at" timestamp, "updated_at" timestamp) 
232
- SQL (0.4ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115648"]]
233
-  (0.4ms) COMMIT
115
+ DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/mattbrooke-smith/Development/notifiable-rails/db/migrate/20131210115648_create_notifiable_apps.rb:7)
116
+  (6.6ms) CREATE TABLE "notifiable_apps" ("id" serial primary key, "name" character varying, "configuration" text, "created_at" timestamp, "updated_at" timestamp) 
117
+ SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115648"]]
118
+  (0.5ms) COMMIT
234
119
  Migrating to CreateNotifiableDeviceTokens (20131210115649)
235
- ActiveRecord::SchemaMigration Load (0.7ms) SELECT "schema_migrations".* FROM "schema_migrations"
236
- Migrating to CreateNotifiableDeviceTokens (20131210115649)
237
-  (0.2ms) BEGIN
238
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
239
-  (4.3ms) CREATE TABLE "notifiable_device_tokens" ("id" serial primary key, "token" character varying, "provider" character varying, "locale" character varying, "is_valid" boolean DEFAULT 't', "user_alias" character varying, "app_id" integer, "created_at" timestamp, "updated_at" timestamp) 
240
-  (0.9ms) CREATE INDEX "index_notifiable_device_tokens_on_user_alias" ON "notifiable_device_tokens" ("user_alias")
120
+  (0.4ms) BEGIN
121
+ DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/mattbrooke-smith/Development/notifiable-rails/db/migrate/20131210115649_create_notifiable_device_tokens.rb:12)
122
+  (4.5ms) CREATE TABLE "notifiable_device_tokens" ("id" serial primary key, "token" character varying, "provider" character varying, "locale" character varying, "is_valid" boolean DEFAULT 't', "user_alias" character varying, "app_id" integer, "created_at" timestamp, "updated_at" timestamp) 
123
+  (1.0ms) CREATE INDEX "index_notifiable_device_tokens_on_user_alias" ON "notifiable_device_tokens" ("user_alias")
241
124
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115649"]]
242
-  (0.4ms) COMMIT
125
+  (0.6ms) COMMIT
243
126
  Migrating to CreateNotifiableNotifications (20131210115650)
244
127
   (0.3ms) BEGIN
245
- DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/matt/Documents/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:23)
246
-  (3.3ms) CREATE TABLE "notifiable_notifications" ("id" serial primary key, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "message" text, "parameters" text, "sound" character varying, "identifier" character varying, "expiry" timestamp, "content_available" boolean, "mutable_content" boolean, "created_at" timestamp, "updated_at" timestamp)
128
+ DEPRECATION WARNING: `#timestamps` was called without specifying an option for `null`. In Rails 5, this behavior will change to `null: false`. You should manually specify `null: true` to prevent the behavior of your existing migrations from changing. (called from block in change at /Users/mattbrooke-smith/Development/notifiable-rails/db/migrate/20131210115650_create_notifiable_notifications.rb:23)
129
+  (3.6ms) CREATE TABLE "notifiable_notifications" ("id" serial primary key, "app_id" integer, "sent_count" integer DEFAULT 0, "gateway_accepted_count" integer DEFAULT 0, "opened_count" integer DEFAULT 0, "message" text, "parameters" text, "sound" character varying, "identifier" character varying, "expiry" timestamp, "content_available" boolean, "mutable_content" boolean, "created_at" timestamp, "updated_at" timestamp)
247
130
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115650"]]
248
-  (0.3ms) COMMIT
131
+  (0.4ms) COMMIT
249
132
  Migrating to CreateNotifiableStatuses (20131210115652)
250
133
   (0.2ms) BEGIN
251
-  (2.4ms) CREATE TABLE "notifiable_statuses" ("id" serial primary key, "notification_id" integer, "device_token_id" integer, "status" integer, "created_at" timestamp)
134
+  (2.5ms) CREATE TABLE "notifiable_statuses" ("id" serial primary key, "notification_id" integer, "device_token_id" integer, "status" integer, "created_at" timestamp)
252
135
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115652"]]
253
-  (0.3ms) COMMIT
136
+  (0.4ms) COMMIT
254
137
  Migrating to AddNameToNotifiableDeviceTokens (20131210115653)
255
138
   (0.3ms) BEGIN
256
-  (1.3ms) ALTER TABLE "notifiable_device_tokens" ADD "name" character varying
139
+  (2.5ms) ALTER TABLE "notifiable_device_tokens" ADD "name" character varying
257
140
  SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20131210115653"]]
258
-  (0.3ms) COMMIT
141
+  (0.5ms) COMMIT
259
142
  Migrating to AddBadgeCountToNotifiableNotifications (20161208221332)
260
-  (0.1ms) BEGIN
143
+  (0.2ms) BEGIN
261
144
   (0.3ms) ALTER TABLE "notifiable_notifications" ADD "badge_count" integer
262
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161208221332"]]
263
-  (0.2ms) COMMIT
145
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20161208221332"]]
146
+  (0.4ms) COMMIT
264
147
  Migrating to RemoveIsValidFromNotifiableDeviceTokens (20170108221332)
265
148
   (0.1ms) BEGIN
266
-  (1.1ms) ALTER TABLE "notifiable_device_tokens" DROP "is_valid"
267
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170108221332"]]
268
-  (0.3ms) COMMIT
149
+  (1.5ms) ALTER TABLE "notifiable_device_tokens" DROP "is_valid"
150
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170108221332"]]
151
+  (0.4ms) COMMIT
269
152
  Migrating to AddAppIdTokenIndexToNotifiableDeviceTokens (20170108221432)
270
-  (0.5ms) BEGIN
271
-  (0.9ms) CREATE UNIQUE INDEX "index_notifiable_device_tokens_on_app_id_and_token" ON "notifiable_device_tokens" ("app_id", "token")
272
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170108221432"]]
273
-  (0.3ms) COMMIT
153
+  (0.1ms) BEGIN
154
+  (1.0ms) CREATE UNIQUE INDEX "index_notifiable_device_tokens_on_app_id_and_token" ON "notifiable_device_tokens" ("app_id", "token")
155
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170108221432"]]
156
+  (0.4ms) COMMIT
274
157
  Migrating to AddLatLonToNotifiableDeviceTokens (20170116212641)
275
158
   (0.1ms) BEGIN
276
- SQL (0.5ms) CREATE EXTENSION IF NOT EXISTS "postgis"
277
-  (24.9ms) ALTER TABLE "notifiable_device_tokens" ADD "latlon" geography(POINT,4326)
278
- SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170116212641"]]
279
-  (0.2ms) COMMIT
159
+ SQL (0.2ms) CREATE EXTENSION IF NOT EXISTS "postgis"
160
+  (8.0ms) ALTER TABLE "notifiable_device_tokens" ADD "lonlat" geography(POINT,4326)
161
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20170116212641"]]
162
+  (0.4ms) COMMIT
163
+ Migrating to AddLastErrorMessageToNotifications (20180302212641)
164
+  (0.1ms) BEGIN
165
+  (0.3ms) ALTER TABLE "notifiable_notifications" ADD "last_error_message" text
166
+ SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ($1) [["version", "20180302212641"]]
167
+  (0.5ms) COMMIT
280
168
  ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
281
-  (3.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
169
+  (4.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
282
170
  FROM pg_constraint c
283
171
  JOIN pg_class t1 ON c.conrelid = t1.oid
284
172
  JOIN pg_class t2 ON c.confrelid = t2.oid
@@ -290,7 +178,7 @@ WHERE c.contype = 'f'
290
178
  AND t3.nspname = ANY (current_schemas(false))
291
179
  ORDER BY c.conname
292
180
  
293
-  (2.8ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
181
+  (4.1ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
294
182
  FROM pg_constraint c
295
183
  JOIN pg_class t1 ON c.conrelid = t1.oid
296
184
  JOIN pg_class t2 ON c.confrelid = t2.oid
@@ -302,7 +190,7 @@ WHERE c.contype = 'f'
302
190
  AND t3.nspname = ANY (current_schemas(false))
303
191
  ORDER BY c.conname
304
192
 
305
-  (2.9ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
193
+  (3.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
306
194
  FROM pg_constraint c
307
195
  JOIN pg_class t1 ON c.conrelid = t1.oid
308
196
  JOIN pg_class t2 ON c.confrelid = t2.oid
@@ -314,7 +202,7 @@ WHERE c.contype = 'f'
314
202
  AND t3.nspname = ANY (current_schemas(false))
315
203
  ORDER BY c.conname
316
204
  
317
-  (3.6ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
205
+  (3.4ms) SELECT t2.oid::regclass::text AS to_table, a1.attname AS column, a2.attname AS primary_key, c.conname AS name, c.confupdtype AS on_update, c.confdeltype AS on_delete
318
206
  FROM pg_constraint c
319
207
  JOIN pg_class t1 ON c.conrelid = t1.oid
320
208
  JOIN pg_class t2 ON c.confrelid = t2.oid
@@ -326,9 +214,3 @@ WHERE c.contype = 'f'
326
214
  AND t3.nspname = ANY (current_schemas(false))
327
215
  ORDER BY c.conname
328
216
 
329
- ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
330
- ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations"
331
- Migrating to AddLatLonToNotifiableDeviceTokens (20170116212641)
332
-  (0.2ms) BEGIN
333
-  (1.0ms) ALTER TABLE "notifiable_device_tokens" DROP "lonlat"
334
-  (0.1ms) ROLLBACK