rpush 1.0.0-java → 2.0.0-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/README.md +37 -22
- data/bin/rpush +13 -4
- data/lib/generators/rpush_generator.rb +2 -0
- data/lib/generators/templates/add_adm.rb +5 -5
- data/lib/generators/templates/add_alert_is_json_to_rapns_notifications.rb +1 -1
- data/lib/generators/templates/add_app_to_rapns.rb +2 -2
- data/lib/generators/templates/add_fail_after_to_rpush_notifications.rb +1 -1
- data/lib/generators/templates/add_gcm.rb +32 -32
- data/lib/generators/templates/add_rpush.rb +67 -67
- data/lib/generators/templates/add_wpns.rb +2 -2
- data/lib/generators/templates/create_rapns_apps.rb +5 -5
- data/lib/generators/templates/create_rapns_feedback.rb +2 -2
- data/lib/generators/templates/create_rapns_notifications.rb +15 -15
- data/lib/generators/templates/rpush.rb +28 -7
- data/lib/generators/templates/rpush_2_0_0_updates.rb +42 -0
- data/lib/rpush/client/active_model/adm/app.rb +23 -0
- data/lib/rpush/client/active_model/adm/data_validator.rb +14 -0
- data/lib/rpush/client/active_model/adm/notification.rb +28 -0
- data/lib/rpush/client/active_model/apns/app.rb +37 -0
- data/lib/rpush/client/active_model/apns/binary_notification_validator.rb +16 -0
- data/lib/rpush/client/active_model/apns/device_token_format_validator.rb +14 -0
- data/lib/rpush/client/active_model/apns/notification.rb +90 -0
- data/lib/rpush/client/active_model/gcm/app.rb +19 -0
- data/lib/rpush/client/active_model/gcm/expiry_collapse_key_mutual_inclusion_validator.rb +14 -0
- data/lib/rpush/client/active_model/gcm/notification.rb +31 -0
- data/lib/rpush/client/active_model/notification.rb +26 -0
- data/lib/rpush/client/active_model/payload_data_size_validator.rb +13 -0
- data/lib/rpush/client/active_model/registration_ids_count_validator.rb +13 -0
- data/lib/rpush/client/active_model/wpns/app.rb +13 -0
- data/lib/rpush/client/active_model/wpns/notification.rb +17 -0
- data/lib/rpush/client/active_model.rb +21 -0
- data/lib/rpush/client/active_record/adm/app.rb +11 -0
- data/lib/rpush/client/active_record/adm/notification.rb +11 -0
- data/lib/rpush/client/active_record/apns/app.rb +11 -0
- data/lib/rpush/client/active_record/apns/feedback.rb +22 -0
- data/lib/rpush/client/active_record/apns/notification.rb +46 -0
- data/lib/rpush/client/active_record/app.rb +17 -0
- data/lib/rpush/client/active_record/gcm/app.rb +11 -0
- data/lib/rpush/client/active_record/gcm/notification.rb +11 -0
- data/lib/rpush/client/active_record/notification.rb +38 -0
- data/lib/rpush/client/active_record/wpns/app.rb +11 -0
- data/lib/rpush/client/active_record/wpns/notification.rb +11 -0
- data/lib/rpush/client/active_record.rb +19 -0
- data/lib/rpush/client/redis/adm/app.rb +14 -0
- data/lib/rpush/client/redis/adm/notification.rb +11 -0
- data/lib/rpush/client/redis/apns/app.rb +11 -0
- data/lib/rpush/client/redis/apns/feedback.rb +20 -0
- data/lib/rpush/client/redis/apns/notification.rb +11 -0
- data/lib/rpush/client/redis/app.rb +24 -0
- data/lib/rpush/client/redis/gcm/app.rb +11 -0
- data/lib/rpush/client/redis/gcm/notification.rb +11 -0
- data/lib/rpush/client/redis/notification.rb +68 -0
- data/lib/rpush/client/redis/wpns/app.rb +11 -0
- data/lib/rpush/client/redis/wpns/notification.rb +11 -0
- data/lib/rpush/client/redis.rb +35 -0
- data/lib/rpush/configuration.rb +27 -6
- data/lib/rpush/daemon/adm/delivery.rb +56 -55
- data/lib/rpush/daemon/apns/delivery.rb +20 -44
- data/lib/rpush/daemon/apns/feedback_receiver.rb +11 -8
- data/lib/rpush/daemon/apns.rb +6 -5
- data/lib/rpush/daemon/app_runner.rb +103 -99
- data/lib/rpush/daemon/batch.rb +54 -40
- data/lib/rpush/daemon/delivery.rb +13 -3
- data/lib/rpush/daemon/delivery_error.rb +10 -2
- data/lib/rpush/daemon/dispatcher/apns_tcp.rb +114 -0
- data/lib/rpush/daemon/dispatcher/http.rb +3 -3
- data/lib/rpush/daemon/dispatcher/tcp.rb +3 -3
- data/lib/rpush/daemon/dispatcher_loop.rb +37 -23
- data/lib/rpush/daemon/errors.rb +18 -0
- data/lib/rpush/daemon/feeder.rb +28 -39
- data/lib/rpush/daemon/gcm/delivery.rb +19 -20
- data/lib/rpush/daemon/interruptible_sleep.rb +26 -45
- data/lib/rpush/daemon/loggable.rb +2 -4
- data/lib/rpush/daemon/proc_title.rb +16 -0
- data/lib/rpush/daemon/queue_payload.rb +12 -0
- data/lib/rpush/daemon/reflectable.rb +3 -5
- data/lib/rpush/daemon/retry_header_parser.rb +6 -6
- data/lib/rpush/daemon/retryable_error.rb +2 -0
- data/lib/rpush/daemon/ring_buffer.rb +16 -0
- data/lib/rpush/daemon/service_config_methods.rb +23 -7
- data/lib/rpush/daemon/signal_handler.rb +56 -0
- data/lib/rpush/daemon/store/active_record/reconnectable.rb +21 -17
- data/lib/rpush/daemon/store/active_record.rb +71 -38
- data/lib/rpush/daemon/store/interface.rb +19 -0
- data/lib/rpush/daemon/store/redis.rb +149 -0
- data/lib/rpush/daemon/string_helpers.rb +15 -0
- data/lib/rpush/daemon/synchronizer.rb +60 -0
- data/lib/rpush/daemon/tcp_connection.rb +6 -11
- data/lib/rpush/daemon/wpns/delivery.rb +21 -30
- data/lib/rpush/daemon.rb +40 -60
- data/lib/rpush/deprecatable.rb +4 -3
- data/lib/rpush/deprecation.rb +7 -10
- data/lib/rpush/embed.rb +8 -3
- data/lib/rpush/logger.rb +11 -15
- data/lib/rpush/push.rb +1 -2
- data/lib/rpush/reflection.rb +8 -12
- data/lib/rpush/version.rb +1 -1
- data/lib/rpush.rb +5 -29
- data/lib/tasks/quality.rake +35 -0
- data/lib/tasks/test.rake +1 -5
- data/spec/.rubocop.yml +4 -0
- data/spec/functional/adm_spec.rb +3 -6
- data/spec/functional/apns_spec.rb +117 -24
- data/spec/functional/embed_spec.rb +20 -20
- data/spec/functional/gcm_spec.rb +4 -7
- data/spec/functional/new_app_spec.rb +59 -0
- data/spec/functional/retry_spec.rb +46 -0
- data/spec/functional/synchronization_spec.rb +68 -0
- data/spec/functional/wpns_spec.rb +3 -6
- data/spec/functional_spec_helper.rb +26 -0
- data/spec/integration/rpush_spec.rb +13 -0
- data/spec/integration/support/gcm_success_response.json +1 -0
- data/spec/spec_helper.rb +60 -0
- data/spec/support/active_record_setup.rb +48 -0
- data/{config → spec/support/config}/database.yml +0 -0
- data/spec/support/install.sh +43 -7
- data/spec/support/simplecov_helper.rb +9 -5
- data/spec/support/simplecov_quality_formatter.rb +10 -6
- data/spec/unit/apns_feedback_spec.rb +3 -3
- data/spec/unit/{adm → client/active_record/adm}/app_spec.rb +3 -3
- data/spec/unit/{adm → client/active_record/adm}/notification_spec.rb +5 -7
- data/spec/unit/client/active_record/apns/app_spec.rb +29 -0
- data/spec/unit/client/active_record/apns/feedback_spec.rb +9 -0
- data/spec/unit/client/active_record/apns/notification_spec.rb +231 -0
- data/spec/unit/client/active_record/app_spec.rb +30 -0
- data/spec/unit/client/active_record/gcm/app_spec.rb +4 -0
- data/spec/unit/{gcm → client/active_record/gcm}/notification_spec.rb +5 -7
- data/spec/unit/client/active_record/notification_spec.rb +21 -0
- data/spec/unit/client/active_record/wpns/app_spec.rb +4 -0
- data/spec/unit/client/active_record/wpns/notification_spec.rb +21 -0
- data/spec/unit/configuration_spec.rb +12 -5
- data/spec/unit/daemon/adm/delivery_spec.rb +66 -55
- data/spec/unit/daemon/apns/certificate_expired_error_spec.rb +3 -3
- data/spec/unit/daemon/apns/delivery_spec.rb +90 -83
- data/spec/unit/daemon/apns/feedback_receiver_spec.rb +22 -17
- data/spec/unit/daemon/app_runner_spec.rb +78 -186
- data/spec/unit/daemon/batch_spec.rb +52 -115
- data/spec/unit/daemon/delivery_spec.rb +15 -1
- data/spec/unit/daemon/dispatcher/http_spec.rb +3 -2
- data/spec/unit/daemon/dispatcher/tcp_spec.rb +10 -9
- data/spec/unit/daemon/dispatcher_loop_spec.rb +6 -24
- data/spec/unit/daemon/feeder_spec.rb +38 -39
- data/spec/unit/daemon/gcm/delivery_spec.rb +122 -101
- data/spec/unit/daemon/reflectable_spec.rb +2 -2
- data/spec/unit/daemon/retryable_error_spec.rb +1 -1
- data/spec/unit/daemon/service_config_methods_spec.rb +6 -3
- data/spec/unit/daemon/signal_handler_spec.rb +95 -0
- data/spec/unit/daemon/store/active_record/reconnectable_spec.rb +48 -27
- data/spec/unit/daemon/store/active_record_spec.rb +38 -47
- data/spec/unit/daemon/tcp_connection_spec.rb +22 -34
- data/spec/unit/daemon/wpns/delivery_spec.rb +58 -50
- data/spec/unit/daemon_spec.rb +48 -82
- data/spec/unit/embed_spec.rb +6 -4
- data/spec/unit/logger_spec.rb +35 -43
- data/spec/unit/notification_shared.rb +9 -79
- data/spec/unit/push_spec.rb +6 -10
- data/spec/unit/reflection_spec.rb +25 -25
- data/spec/unit/rpush_spec.rb +1 -2
- data/spec/unit_spec_helper.rb +33 -88
- metadata +126 -76
- data/lib/rpush/TODO +0 -3
- data/lib/rpush/adm/app.rb +0 -15
- data/lib/rpush/adm/data_validator.rb +0 -11
- data/lib/rpush/adm/notification.rb +0 -29
- data/lib/rpush/apns/app.rb +0 -29
- data/lib/rpush/apns/binary_notification_validator.rb +0 -12
- data/lib/rpush/apns/device_token_format_validator.rb +0 -12
- data/lib/rpush/apns/feedback.rb +0 -16
- data/lib/rpush/apns/notification.rb +0 -84
- data/lib/rpush/app.rb +0 -18
- data/lib/rpush/daemon/apns/certificate_expired_error.rb +0 -20
- data/lib/rpush/daemon/apns/disconnection_error.rb +0 -20
- data/lib/rpush/daemon/dispatcher_loop_collection.rb +0 -33
- data/lib/rpush/daemon/too_many_requests_error.rb +0 -20
- data/lib/rpush/gcm/app.rb +0 -11
- data/lib/rpush/gcm/expiry_collapse_key_mutual_inclusion_validator.rb +0 -11
- data/lib/rpush/gcm/notification.rb +0 -30
- data/lib/rpush/notification.rb +0 -69
- data/lib/rpush/notifier.rb +0 -52
- data/lib/rpush/payload_data_size_validator.rb +0 -10
- data/lib/rpush/railtie.rb +0 -11
- data/lib/rpush/registration_ids_count_validator.rb +0 -10
- data/lib/rpush/wpns/app.rb +0 -9
- data/lib/rpush/wpns/notification.rb +0 -26
- data/lib/tasks/cane.rake +0 -18
- data/lib/tasks/rpush.rake +0 -16
- data/spec/unit/apns/app_spec.rb +0 -29
- data/spec/unit/apns/feedback_spec.rb +0 -9
- data/spec/unit/apns/notification_spec.rb +0 -208
- data/spec/unit/app_spec.rb +0 -30
- data/spec/unit/daemon/apns/disconnection_error_spec.rb +0 -18
- data/spec/unit/daemon/dispatcher_loop_collection_spec.rb +0 -37
- data/spec/unit/daemon/interruptible_sleep_spec.rb +0 -68
- data/spec/unit/daemon/too_many_requests_error_spec.rb +0 -14
- data/spec/unit/gcm/app_spec.rb +0 -4
- data/spec/unit/notification_spec.rb +0 -15
- data/spec/unit/notifier_spec.rb +0 -49
- data/spec/unit/wpns/app_spec.rb +0 -4
- data/spec/unit/wpns/notification_spec.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61cf526e008ad5aba0d3523150428719f09a85a3
|
4
|
+
data.tar.gz: c126e4d03cefc7fe33e99b5b49f6f2854cfcabfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a871d37518b8643b373c31186bd97242eb23fb44d524c4c1c2d23bd002bf4d49020ee6883b37864613f5a2c85dc47561676ed06c9e3997342c52e4ec59db287
|
7
|
+
data.tar.gz: 98529b49e823bb026644a6b1b299ce7e0ffa4a373c47cb70f7fc7484900febdc42c82603d541624a2bcd9e3d8a2622c815489db8f1b510ff95e8f2e7af401e1f
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## 2.0.0 (Sept 6, 2014)
|
2
|
+
* Use APNs enhanced binary format version 2.
|
3
|
+
* Support running multiple Rpush processes when using ActiveRecord and Redis.
|
4
|
+
* APNs error detection is now performed asynchronously, 'check_for_errors' is therefore deprecated.
|
5
|
+
* Deprecated attributes_for_device accessors. Use data instead.
|
6
|
+
* Fix signal handling to work with Ruby 2.x. (#40).
|
7
|
+
* You no longer need to signal HUP after creating a new app, they will be loaded automatically for you.
|
8
|
+
* APNs notifications are now delivered in batches, greatly improving throughput.
|
9
|
+
* Signaling HUP now also causes Rpush to immediately check for new notifications.
|
10
|
+
* The 'wakeup' config option has been removed.
|
11
|
+
* The 'batch_storage_updates' config option has been deprecated, storage backends will now always batch updates where appropriate.
|
12
|
+
* The rpush process title updates with number of queued notifications and number of dispatchers.
|
13
|
+
* Rpush::Apns::Feedback#app has been renamed to app_id and is now an Integer.
|
14
|
+
* An app is restarted when the HUP signal is received if its certificate or environment attribute changed.
|
15
|
+
|
1
16
|
## 1.0.0 (Feb 9, 2014)
|
2
17
|
* Renamed to Rpush (from Rapns). Version number reset to 1.0.0.
|
3
18
|
* Reduce default batch size to 100.
|
data/README.md
CHANGED
@@ -1,24 +1,32 @@
|
|
1
1
|
[](http://travis-ci.org/rpush/rpush)
|
2
2
|
[](https://codeclimate.com/github/rpush/rpush)
|
3
|
-
[](https://codeclimate.com/github/rpush/rpush)
|
4
4
|
[](http://badge.fury.io/rb/rpush)
|
5
5
|
|
6
|
-
<img src="https://raw.github.com/rpush/rpush/master/
|
6
|
+
<img src="https://raw.github.com/rpush/rpush/master/logo.png" align="right" width="200px" />
|
7
7
|
|
8
8
|
### Rpush. The push notification service for Ruby.
|
9
9
|
|
10
|
-
*
|
10
|
+
* Supported services:
|
11
11
|
* **Apple Push Notification Service**
|
12
|
-
* **Google Cloud Messaging
|
13
|
-
* **Amazon
|
14
|
-
* **Windows Push Notification Service
|
12
|
+
* **Google Cloud Messaging**
|
13
|
+
* **Amazon Device Messaging**
|
14
|
+
* **Windows Phone Push Notification Service**
|
15
|
+
|
16
|
+
|
17
|
+
* Supported storage backends:
|
18
|
+
* ActiveRecord
|
19
|
+
* Redis
|
20
|
+
* More coming soon!
|
21
|
+
|
22
|
+
|
15
23
|
* Seamless Rails (3, 4) integration.
|
16
|
-
*
|
17
|
-
* Designed for uptime - signal
|
18
|
-
* Run as a daemon or inside an [existing
|
24
|
+
* Scales vertically (threading) and horizontally (multiple processes).
|
25
|
+
* Designed for uptime - new apps are loaded automatically, signal `HUP` to update running apps.
|
26
|
+
* Run as a daemon or inside an [existing process](https://github.com/rpush/rpush/wiki/Embedding-API).
|
19
27
|
* Use in a scheduler for low-workload deployments ([Push API](https://github.com/rpush/rpush/wiki/Push-API)).
|
20
28
|
* Hooks for fine-grained instrumentation and error handling ([Reflection API](https://github.com/rpush/rpush/wiki/Reflection-API)).
|
21
|
-
* Works with MRI, JRuby
|
29
|
+
* Works with MRI, JRuby and Rubinius.
|
22
30
|
|
23
31
|
|
24
32
|
### Getting Started
|
@@ -29,7 +37,7 @@ Add it to your Gemfile:
|
|
29
37
|
gem 'rpush'
|
30
38
|
```
|
31
39
|
|
32
|
-
Generate the migrations, rpush.
|
40
|
+
Generate the migrations, rpush.rb and migrate:
|
33
41
|
|
34
42
|
```
|
35
43
|
rails g rpush
|
@@ -57,7 +65,7 @@ n = Rpush::Apns::Notification.new
|
|
57
65
|
n.app = Rpush::Apns::App.find_by_name("ios_app")
|
58
66
|
n.device_token = "..."
|
59
67
|
n.alert = "hi mom!"
|
60
|
-
n.
|
68
|
+
n.data = { foo: :bar }
|
61
69
|
n.save!
|
62
70
|
```
|
63
71
|
|
@@ -76,8 +84,8 @@ app.save!
|
|
76
84
|
```ruby
|
77
85
|
n = Rpush::Gcm::Notification.new
|
78
86
|
n.app = Rpush::Gcm::App.find_by_name("android_app")
|
79
|
-
n.registration_ids = ["..."]
|
80
|
-
n.data = {:
|
87
|
+
n.registration_ids = ["token", "..."]
|
88
|
+
n.data = { message: "hi mom!" }
|
81
89
|
n.save!
|
82
90
|
```
|
83
91
|
|
@@ -98,7 +106,7 @@ app.save!
|
|
98
106
|
n = Rpush::Adm::Notification.new
|
99
107
|
n.app = Rpush::Adm::App.find_by_name("kindle_app")
|
100
108
|
n.registration_ids = ["..."]
|
101
|
-
n.data = {:
|
109
|
+
n.data = { message: "hi mom!"}
|
102
110
|
n.collapse_key = "Optional consolidationKey"
|
103
111
|
n.save!
|
104
112
|
```
|
@@ -122,33 +130,40 @@ n.alert = "..."
|
|
122
130
|
n.save!
|
123
131
|
```
|
124
132
|
|
125
|
-
###
|
133
|
+
### Running Rpush
|
134
|
+
|
135
|
+
It is recommended to run Rpush as a separate process in most cases, though embedding and manual modes are provided for low-workload environments.
|
126
136
|
|
127
|
-
As a daemon:
|
137
|
+
#### As a daemon (recommended):
|
128
138
|
|
129
139
|
cd /path/to/rails/app
|
130
140
|
rpush <Rails environment> [options]
|
131
141
|
|
132
|
-
|
142
|
+
#### Embedded inside an existing process
|
133
143
|
|
134
144
|
```ruby
|
145
|
+
# Call this during startup of your application, for example, by adding it to the end of config/initializers/rpush.rb
|
135
146
|
Rpush.embed
|
136
147
|
```
|
137
148
|
|
138
|
-
|
149
|
+
See [Embedding API](https://github.com/rpush/rpush/wiki/Embedding-API) for more details.
|
139
150
|
|
140
|
-
|
151
|
+
#### Manually (in a scheduler)
|
141
152
|
|
142
153
|
```ruby
|
143
154
|
Rpush.push
|
144
155
|
Rpush.apns_feedback
|
145
156
|
```
|
146
157
|
|
158
|
+
See [Push API](https://github.com/rpush/rpush/wiki/Push-API) for more details.
|
159
|
+
|
160
|
+
### Configuration
|
161
|
+
|
147
162
|
See [Configuration](https://github.com/rpush/rpush/wiki/Configuration) for a list of options, or run `rpush --help`.
|
148
163
|
|
149
164
|
### Updating Rpush
|
150
165
|
|
151
|
-
|
166
|
+
If you're using ActiveRecord, you should run `rails g rpush` after upgrading Rpush to check for any new migrations.
|
152
167
|
|
153
168
|
### Wiki
|
154
169
|
|
@@ -172,7 +187,7 @@ After updating you should run `rails g rpush` to check for any new migrations.
|
|
172
187
|
* [Silent failures might be dropped connections](https://github.com/rpush/rpush/wiki/Dropped-connections)
|
173
188
|
|
174
189
|
### Google Cloud Messaging
|
175
|
-
* [Notification Options](https://github.com/rpush/rpush/wiki
|
190
|
+
* [Notification Options](https://github.com/rpush/rpush/wiki/GCM-Notification-Options)
|
176
191
|
* [Canonical IDs](https://github.com/rpush/rpush/wiki/Canonical-IDs)
|
177
192
|
* [Delivery Failures & Retries](https://github.com/rpush/rpush/wiki/Delivery-Failures-&-Retries)
|
178
193
|
|
data/bin/rpush
CHANGED
@@ -12,12 +12,21 @@ options = ARGV.options do |opts|
|
|
12
12
|
opts.on('-f', '--foreground', 'Run in the foreground.') { config.foreground = true }
|
13
13
|
opts.on('-P N', '--db-poll N', Integer, "Frequency in seconds to check for new notifications.") { |n| config.push_poll = n }
|
14
14
|
opts.on('-F N', '--feedback-poll N', Integer, "Frequency in seconds to check for feedback.") { |n| config.feedback_poll = n }
|
15
|
-
opts.on('-e', '--no-error-checks', 'Disable APNs error checking after notification delivery.') { config.check_for_errors = false }
|
15
|
+
opts.on('-e', '--no-error-checks', 'Disable APNs error checking after notification delivery.') { config.check_for_errors = false } # deprecated
|
16
16
|
opts.on('-p PATH', '--pid-file PATH', String, 'Path to write PID file. Relative to Rails root unless absolute.') { |path| config.pid_file = path }
|
17
17
|
opts.on('-b N', '--batch-size N', Integer, 'Storage backend notification batch size.') { |n| config.batch_size = n }
|
18
|
-
opts.on('-B', '--[no-]batch-storage-updates', 'Perform storage updates in batches.') { |v| config.batch_storage_updates = v }
|
19
|
-
opts.on('-v', '--version', 'Print the version.')
|
20
|
-
|
18
|
+
opts.on('-B', '--[no-]batch-storage-updates', 'Perform storage updates in batches.') { |v| config.batch_storage_updates = v } # deprecated
|
19
|
+
opts.on('-v', '--version', 'Print the version.') do
|
20
|
+
puts "rpush #{Rpush::VERSION}"
|
21
|
+
exit
|
22
|
+
end
|
23
|
+
opts.on('-h', '--help', 'You\'re looking at it.') do
|
24
|
+
hidden_switches = %w(-e --no-error-checks)
|
25
|
+
puts opts.to_s.split("\n").delete_if do |line|
|
26
|
+
hidden_switches.any? { |s| line =~ /#{s}/ }
|
27
|
+
end.join("\n")
|
28
|
+
exit
|
29
|
+
end
|
21
30
|
end
|
22
31
|
|
23
32
|
if environment.nil? || environment =~ /^-/
|
@@ -6,14 +6,14 @@ class AddAdm < ActiveRecord::Migration
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def self.up
|
9
|
-
add_column :rapns_apps, :client_id, :string, :
|
10
|
-
add_column :rapns_apps, :client_secret, :string, :
|
11
|
-
add_column :rapns_apps, :access_token, :string, :
|
12
|
-
add_column :rapns_apps, :access_token_expiration, :datetime, :
|
9
|
+
add_column :rapns_apps, :client_id, :string, null: true
|
10
|
+
add_column :rapns_apps, :client_secret, :string, null: true
|
11
|
+
add_column :rapns_apps, :access_token, :string, null: true
|
12
|
+
add_column :rapns_apps, :access_token_expiration, :datetime, null: true
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.down
|
16
|
-
AddAdm::Rapns::Notification.where(:
|
16
|
+
AddAdm::Rapns::Notification.where(type: 'Rapns::Adm::Notification').delete_all
|
17
17
|
|
18
18
|
remove_column :rapns_apps, :client_id
|
19
19
|
remove_column :rapns_apps, :client_secret
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddAlertIsJsonToRapnsNotifications < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
|
-
add_column :rapns_notifications, :alert_is_json, :boolean, :
|
3
|
+
add_column :rapns_notifications, :alert_is_json, :boolean, null: true, default: false
|
4
4
|
end
|
5
5
|
|
6
6
|
def self.down
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class AddAppToRapns < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
|
-
add_column :rapns_notifications, :app, :string, :
|
4
|
-
add_column :rapns_feedback, :app, :string, :
|
3
|
+
add_column :rapns_notifications, :app, :string, null: true
|
4
|
+
add_column :rapns_feedback, :app, :string, null: true
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.down
|
@@ -11,34 +11,34 @@ class AddGcm < ActiveRecord::Migration
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.up
|
14
|
-
add_column :rapns_notifications, :type, :string, :
|
15
|
-
add_column :rapns_apps, :type, :string, :
|
14
|
+
add_column :rapns_notifications, :type, :string, null: true
|
15
|
+
add_column :rapns_apps, :type, :string, null: true
|
16
16
|
|
17
|
-
AddGcm::Rapns::Notification.update_all :
|
18
|
-
AddGcm::Rapns::App.update_all :
|
17
|
+
AddGcm::Rapns::Notification.update_all type: 'Rapns::Apns::Notification'
|
18
|
+
AddGcm::Rapns::App.update_all type: 'Rapns::Apns::App'
|
19
19
|
|
20
|
-
change_column :rapns_notifications, :type, :string, :
|
21
|
-
change_column :rapns_apps, :type, :string, :
|
22
|
-
change_column :rapns_notifications, :device_token, :string, { :
|
23
|
-
change_column :rapns_notifications, :expiry, :integer, { :
|
24
|
-
change_column :rapns_apps, :environment, :string, :
|
25
|
-
change_column :rapns_apps, :certificate, :text, :
|
20
|
+
change_column :rapns_notifications, :type, :string, null: false
|
21
|
+
change_column :rapns_apps, :type, :string, null: false
|
22
|
+
change_column :rapns_notifications, :device_token, :string, { null: true, limit: 64 }
|
23
|
+
change_column :rapns_notifications, :expiry, :integer, { null: true, default: 1.day.to_i }
|
24
|
+
change_column :rapns_apps, :environment, :string, null: true
|
25
|
+
change_column :rapns_apps, :certificate, :text, null: true, default: nil
|
26
26
|
|
27
|
-
change_column :rapns_notifications, :error_description, :text, :
|
28
|
-
change_column :rapns_notifications, :sound, :string, :
|
27
|
+
change_column :rapns_notifications, :error_description, :text, null: true, default: nil
|
28
|
+
change_column :rapns_notifications, :sound, :string, default: 'default'
|
29
29
|
|
30
30
|
rename_column :rapns_notifications, :attributes_for_device, :data
|
31
31
|
rename_column :rapns_apps, :key, :name
|
32
32
|
|
33
|
-
add_column :rapns_apps, :auth_key, :string, :
|
33
|
+
add_column :rapns_apps, :auth_key, :string, null: true
|
34
34
|
|
35
|
-
add_column :rapns_notifications, :collapse_key, :string, :
|
36
|
-
add_column :rapns_notifications, :delay_while_idle, :boolean, :
|
35
|
+
add_column :rapns_notifications, :collapse_key, :string, null: true
|
36
|
+
add_column :rapns_notifications, :delay_while_idle, :boolean, null: false, default: false
|
37
37
|
|
38
38
|
reg_ids_type = ActiveRecord::Base.connection.adapter_name.include?('Mysql') ? :mediumtext : :text
|
39
|
-
add_column :rapns_notifications, :registration_ids, reg_ids_type, :
|
40
|
-
add_column :rapns_notifications, :app_id, :integer, :
|
41
|
-
add_column :rapns_notifications, :retries, :integer, :
|
39
|
+
add_column :rapns_notifications, :registration_ids, reg_ids_type, null: true
|
40
|
+
add_column :rapns_notifications, :app_id, :integer, null: true
|
41
|
+
add_column :rapns_notifications, :retries, :integer, null: true, default: 0
|
42
42
|
|
43
43
|
AddGcm::Rapns::Notification.reset_column_information
|
44
44
|
AddGcm::Rapns::App.reset_column_information
|
@@ -47,30 +47,30 @@ class AddGcm < ActiveRecord::Migration
|
|
47
47
|
AddGcm::Rapns::Notification.update_all(['app_id = ?', app.id], ['app = ?', app.name])
|
48
48
|
end
|
49
49
|
|
50
|
-
change_column :rapns_notifications, :app_id, :integer, :
|
50
|
+
change_column :rapns_notifications, :app_id, :integer, null: false
|
51
51
|
remove_column :rapns_notifications, :app
|
52
52
|
|
53
53
|
if index_name_exists?(:rapns_notifications, "index_rapns_notifications_multi", true)
|
54
|
-
remove_index :rapns_notifications, :
|
54
|
+
remove_index :rapns_notifications, name: "index_rapns_notifications_multi"
|
55
55
|
elsif index_name_exists?(:rapns_notifications, "index_rapns_notifications_on_delivered_failed_deliver_after", false)
|
56
|
-
remove_index :rapns_notifications, :
|
56
|
+
remove_index :rapns_notifications, name: "index_rapns_notifications_on_delivered_failed_deliver_after"
|
57
57
|
end
|
58
|
-
add_index :rapns_notifications, [:app_id, :delivered, :failed, :deliver_after], :
|
58
|
+
add_index :rapns_notifications, [:app_id, :delivered, :failed, :deliver_after], name: "index_rapns_notifications_multi"
|
59
59
|
end
|
60
60
|
|
61
61
|
def self.down
|
62
|
-
AddGcm::Rapns::Notification.where(:
|
62
|
+
AddGcm::Rapns::Notification.where(type: 'Rapns::Gcm::Notification').delete_all
|
63
63
|
|
64
64
|
remove_column :rapns_notifications, :type
|
65
65
|
remove_column :rapns_apps, :type
|
66
66
|
|
67
|
-
change_column :rapns_notifications, :device_token, :string, { :
|
68
|
-
change_column :rapns_notifications, :expiry, :integer, { :
|
69
|
-
change_column :rapns_apps, :environment, :string, :
|
70
|
-
change_column :rapns_apps, :certificate, :text, :
|
67
|
+
change_column :rapns_notifications, :device_token, :string, { null: false, limit: 64 }
|
68
|
+
change_column :rapns_notifications, :expiry, :integer, { null: false, default: 1.day.to_i }
|
69
|
+
change_column :rapns_apps, :environment, :string, null: false
|
70
|
+
change_column :rapns_apps, :certificate, :text, null: false
|
71
71
|
|
72
|
-
change_column :rapns_notifications, :error_description, :string, :
|
73
|
-
change_column :rapns_notifications, :sound, :string, :
|
72
|
+
change_column :rapns_notifications, :error_description, :string, null: true, default: nil
|
73
|
+
change_column :rapns_notifications, :sound, :string, default: '1.aiff'
|
74
74
|
|
75
75
|
rename_column :rapns_notifications, :data, :attributes_for_device
|
76
76
|
rename_column :rapns_apps, :name, :key
|
@@ -82,7 +82,7 @@ class AddGcm < ActiveRecord::Migration
|
|
82
82
|
remove_column :rapns_notifications, :registration_ids
|
83
83
|
remove_column :rapns_notifications, :retries
|
84
84
|
|
85
|
-
add_column :rapns_notifications, :app, :string, :
|
85
|
+
add_column :rapns_notifications, :app, :string, null: true
|
86
86
|
|
87
87
|
AddGcm::Rapns::Notification.reset_column_information
|
88
88
|
AddGcm::Rapns::App.reset_column_information
|
@@ -92,11 +92,11 @@ class AddGcm < ActiveRecord::Migration
|
|
92
92
|
end
|
93
93
|
|
94
94
|
if index_name_exists?(:rapns_notifications, :index_rapns_notifications_multi, true)
|
95
|
-
|
95
|
+
remove_index :rapns_notifications, name: :index_rapns_notifications_multi
|
96
96
|
end
|
97
97
|
|
98
98
|
remove_column :rapns_notifications, :app_id
|
99
99
|
|
100
|
-
add_index :rapns_notifications, [:delivered, :failed, :deliver_after], :
|
100
|
+
add_index :rapns_notifications, [:delivered, :failed, :deliver_after], name: :index_rapns_notifications_multi
|
101
101
|
end
|
102
102
|
end
|
@@ -44,28 +44,28 @@ class AddRpush < ActiveRecord::Migration
|
|
44
44
|
class CreateRapnsNotifications < ActiveRecord::Migration
|
45
45
|
def self.up
|
46
46
|
create_table :rapns_notifications do |t|
|
47
|
-
t.integer :badge, :
|
48
|
-
t.string :device_token, :
|
49
|
-
t.string :sound, :
|
50
|
-
t.string :alert, :
|
51
|
-
t.text :attributes_for_device, :
|
52
|
-
t.integer :expiry, :
|
53
|
-
t.boolean :delivered, :
|
54
|
-
t.timestamp :delivered_at, :
|
55
|
-
t.boolean :failed, :
|
56
|
-
t.timestamp :failed_at, :
|
57
|
-
t.integer :error_code, :
|
58
|
-
t.string :error_description, :
|
59
|
-
t.timestamp :deliver_after, :
|
47
|
+
t.integer :badge, null: true
|
48
|
+
t.string :device_token, null: false, limit: 64
|
49
|
+
t.string :sound, null: true, default: "1.aiff"
|
50
|
+
t.string :alert, null: true
|
51
|
+
t.text :attributes_for_device, null: true
|
52
|
+
t.integer :expiry, null: false, default: 1.day.to_i
|
53
|
+
t.boolean :delivered, null: false, default: false
|
54
|
+
t.timestamp :delivered_at, null: true
|
55
|
+
t.boolean :failed, null: false, default: false
|
56
|
+
t.timestamp :failed_at, null: true
|
57
|
+
t.integer :error_code, null: true
|
58
|
+
t.string :error_description, null: true
|
59
|
+
t.timestamp :deliver_after, null: true
|
60
60
|
t.timestamps
|
61
61
|
end
|
62
62
|
|
63
|
-
add_index :rapns_notifications, [:delivered, :failed, :deliver_after], :
|
63
|
+
add_index :rapns_notifications, [:delivered, :failed, :deliver_after], name: 'index_rapns_notifications_multi'
|
64
64
|
end
|
65
65
|
|
66
66
|
def self.down
|
67
67
|
if index_name_exists?(:rapns_notifications, 'index_rapns_notifications_multi', true)
|
68
|
-
remove_index :rapns_notifications, :
|
68
|
+
remove_index :rapns_notifications, name: 'index_rapns_notifications_multi'
|
69
69
|
end
|
70
70
|
drop_table :rapns_notifications
|
71
71
|
end
|
@@ -74,8 +74,8 @@ class AddRpush < ActiveRecord::Migration
|
|
74
74
|
class CreateRapnsFeedback < ActiveRecord::Migration
|
75
75
|
def self.up
|
76
76
|
create_table :rapns_feedback do |t|
|
77
|
-
t.string :device_token, :
|
78
|
-
t.timestamp :failed_at, :
|
77
|
+
t.string :device_token, null: false, limit: 64
|
78
|
+
t.timestamp :failed_at, null: false
|
79
79
|
t.timestamps
|
80
80
|
end
|
81
81
|
|
@@ -92,7 +92,7 @@ class AddRpush < ActiveRecord::Migration
|
|
92
92
|
|
93
93
|
class AddAlertIsJsonToRapnsNotifications < ActiveRecord::Migration
|
94
94
|
def self.up
|
95
|
-
add_column :rapns_notifications, :alert_is_json, :boolean, :
|
95
|
+
add_column :rapns_notifications, :alert_is_json, :boolean, null: true, default: false
|
96
96
|
end
|
97
97
|
|
98
98
|
def self.down
|
@@ -102,8 +102,8 @@ class AddRpush < ActiveRecord::Migration
|
|
102
102
|
|
103
103
|
class AddAppToRapns < ActiveRecord::Migration
|
104
104
|
def self.up
|
105
|
-
add_column :rapns_notifications, :app, :string, :
|
106
|
-
add_column :rapns_feedback, :app, :string, :
|
105
|
+
add_column :rapns_notifications, :app, :string, null: true
|
106
|
+
add_column :rapns_feedback, :app, :string, null: true
|
107
107
|
end
|
108
108
|
|
109
109
|
def self.down
|
@@ -115,11 +115,11 @@ class AddRpush < ActiveRecord::Migration
|
|
115
115
|
class CreateRapnsApps < ActiveRecord::Migration
|
116
116
|
def self.up
|
117
117
|
create_table :rapns_apps do |t|
|
118
|
-
t.string :key, :
|
119
|
-
t.string :environment, :
|
120
|
-
t.text :certificate, :
|
121
|
-
t.string :password, :
|
122
|
-
t.integer :connections, :
|
118
|
+
t.string :key, null: false
|
119
|
+
t.string :environment, null: false
|
120
|
+
t.text :certificate, null: false
|
121
|
+
t.string :password, null: true
|
122
|
+
t.integer :connections, null: false, default: 1
|
123
123
|
t.timestamps
|
124
124
|
end
|
125
125
|
end
|
@@ -142,66 +142,66 @@ class AddRpush < ActiveRecord::Migration
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def self.up
|
145
|
-
add_column :rapns_notifications, :type, :string, :
|
146
|
-
add_column :rapns_apps, :type, :string, :
|
145
|
+
add_column :rapns_notifications, :type, :string, null: true
|
146
|
+
add_column :rapns_apps, :type, :string, null: true
|
147
147
|
|
148
|
-
AddGcm::Rapns::Notification.update_all :
|
149
|
-
AddGcm::Rapns::App.update_all :
|
148
|
+
AddGcm::Rapns::Notification.update_all type: 'Rapns::Apns::Notification'
|
149
|
+
AddGcm::Rapns::App.update_all type: 'Rapns::Apns::App'
|
150
150
|
|
151
|
-
change_column :rapns_notifications, :type, :string, :
|
152
|
-
change_column :rapns_apps, :type, :string, :
|
153
|
-
change_column :rapns_notifications, :device_token, :string, { :
|
154
|
-
change_column :rapns_notifications, :expiry, :integer, { :
|
155
|
-
change_column :rapns_apps, :environment, :string, :
|
156
|
-
change_column :rapns_apps, :certificate, :text, :
|
151
|
+
change_column :rapns_notifications, :type, :string, null: false
|
152
|
+
change_column :rapns_apps, :type, :string, null: false
|
153
|
+
change_column :rapns_notifications, :device_token, :string, { null: true, limit: 64 }
|
154
|
+
change_column :rapns_notifications, :expiry, :integer, { null: true, default: 1.day.to_i }
|
155
|
+
change_column :rapns_apps, :environment, :string, null: true
|
156
|
+
change_column :rapns_apps, :certificate, :text, null: true, default: nil
|
157
157
|
|
158
|
-
change_column :rapns_notifications, :error_description, :text, :
|
159
|
-
change_column :rapns_notifications, :sound, :string, :
|
158
|
+
change_column :rapns_notifications, :error_description, :text, null: true, default: nil
|
159
|
+
change_column :rapns_notifications, :sound, :string, default: 'default'
|
160
160
|
|
161
161
|
rename_column :rapns_notifications, :attributes_for_device, :data
|
162
162
|
rename_column :rapns_apps, :key, :name
|
163
163
|
|
164
|
-
add_column :rapns_apps, :auth_key, :string, :
|
164
|
+
add_column :rapns_apps, :auth_key, :string, null: true
|
165
165
|
|
166
|
-
add_column :rapns_notifications, :collapse_key, :string, :
|
167
|
-
add_column :rapns_notifications, :delay_while_idle, :boolean, :
|
166
|
+
add_column :rapns_notifications, :collapse_key, :string, null: true
|
167
|
+
add_column :rapns_notifications, :delay_while_idle, :boolean, null: false, default: false
|
168
168
|
|
169
169
|
reg_ids_type = ActiveRecord::Base.connection.adapter_name.include?('Mysql') ? :mediumtext : :text
|
170
|
-
add_column :rapns_notifications, :registration_ids, reg_ids_type, :
|
171
|
-
add_column :rapns_notifications, :app_id, :integer, :
|
172
|
-
add_column :rapns_notifications, :retries, :integer, :
|
170
|
+
add_column :rapns_notifications, :registration_ids, reg_ids_type, null: true
|
171
|
+
add_column :rapns_notifications, :app_id, :integer, null: true
|
172
|
+
add_column :rapns_notifications, :retries, :integer, null: true, default: 0
|
173
173
|
|
174
174
|
AddGcm::Rapns::Notification.reset_column_information
|
175
175
|
AddGcm::Rapns::App.reset_column_information
|
176
176
|
|
177
177
|
AddGcm::Rapns::App.all.each do |app|
|
178
|
-
AddGcm::Rapns::Notification.update_all(
|
178
|
+
AddGcm::Rapns::Notification.where(app: app.name).update_all(app_id: app.id)
|
179
179
|
end
|
180
180
|
|
181
|
-
change_column :rapns_notifications, :app_id, :integer, :
|
181
|
+
change_column :rapns_notifications, :app_id, :integer, null: false
|
182
182
|
remove_column :rapns_notifications, :app
|
183
183
|
|
184
184
|
if index_name_exists?(:rapns_notifications, "index_rapns_notifications_multi", true)
|
185
|
-
remove_index :rapns_notifications, :
|
185
|
+
remove_index :rapns_notifications, name: "index_rapns_notifications_multi"
|
186
186
|
elsif index_name_exists?(:rapns_notifications, "index_rapns_notifications_on_delivered_failed_deliver_after", false)
|
187
|
-
remove_index :rapns_notifications, :
|
187
|
+
remove_index :rapns_notifications, name: "index_rapns_notifications_on_delivered_failed_deliver_after"
|
188
188
|
end
|
189
|
-
add_index :rapns_notifications, [:app_id, :delivered, :failed, :deliver_after], :
|
189
|
+
add_index :rapns_notifications, [:app_id, :delivered, :failed, :deliver_after], name: "index_rapns_notifications_multi"
|
190
190
|
end
|
191
191
|
|
192
192
|
def self.down
|
193
|
-
AddGcm::Rapns::Notification.where(:
|
193
|
+
AddGcm::Rapns::Notification.where(type: 'Rapns::Gcm::Notification').delete_all
|
194
194
|
|
195
195
|
remove_column :rapns_notifications, :type
|
196
196
|
remove_column :rapns_apps, :type
|
197
197
|
|
198
|
-
change_column :rapns_notifications, :device_token, :string, { :
|
199
|
-
change_column :rapns_notifications, :expiry, :integer, { :
|
200
|
-
change_column :rapns_apps, :environment, :string, :
|
201
|
-
change_column :rapns_apps, :certificate, :text, :
|
198
|
+
change_column :rapns_notifications, :device_token, :string, { null: false, limit: 64 }
|
199
|
+
change_column :rapns_notifications, :expiry, :integer, { null: false, default: 1.day.to_i }
|
200
|
+
change_column :rapns_apps, :environment, :string, null: false
|
201
|
+
change_column :rapns_apps, :certificate, :text, null: false
|
202
202
|
|
203
|
-
change_column :rapns_notifications, :error_description, :string, :
|
204
|
-
change_column :rapns_notifications, :sound, :string, :
|
203
|
+
change_column :rapns_notifications, :error_description, :string, null: true, default: nil
|
204
|
+
change_column :rapns_notifications, :sound, :string, default: '1.aiff'
|
205
205
|
|
206
206
|
rename_column :rapns_notifications, :data, :attributes_for_device
|
207
207
|
rename_column :rapns_apps, :name, :key
|
@@ -213,22 +213,22 @@ class AddRpush < ActiveRecord::Migration
|
|
213
213
|
remove_column :rapns_notifications, :registration_ids
|
214
214
|
remove_column :rapns_notifications, :retries
|
215
215
|
|
216
|
-
add_column :rapns_notifications, :app, :string, :
|
216
|
+
add_column :rapns_notifications, :app, :string, null: true
|
217
217
|
|
218
218
|
AddGcm::Rapns::Notification.reset_column_information
|
219
219
|
AddGcm::Rapns::App.reset_column_information
|
220
220
|
|
221
221
|
AddGcm::Rapns::App.all.each do |app|
|
222
|
-
AddGcm::Rapns::Notification.update_all(
|
222
|
+
AddGcm::Rapns::Notification.where(app_id: app.id).update_all(app: app.key)
|
223
223
|
end
|
224
224
|
|
225
225
|
if index_name_exists?(:rapns_notifications, :index_rapns_notifications_multi, true)
|
226
|
-
remove_index :rapns_notifications, :
|
226
|
+
remove_index :rapns_notifications, name: :index_rapns_notifications_multi
|
227
227
|
end
|
228
228
|
|
229
229
|
remove_column :rapns_notifications, :app_id
|
230
230
|
|
231
|
-
add_index :rapns_notifications, [:delivered, :failed, :deliver_after], :
|
231
|
+
add_index :rapns_notifications, [:delivered, :failed, :deliver_after], name: :index_rapns_notifications_multi
|
232
232
|
end
|
233
233
|
end
|
234
234
|
|
@@ -240,11 +240,11 @@ class AddRpush < ActiveRecord::Migration
|
|
240
240
|
end
|
241
241
|
|
242
242
|
def self.up
|
243
|
-
add_column :rapns_notifications, :uri, :string, :
|
243
|
+
add_column :rapns_notifications, :uri, :string, null: true
|
244
244
|
end
|
245
245
|
|
246
246
|
def self.down
|
247
|
-
AddWpns::Rapns::Notification.where(:
|
247
|
+
AddWpns::Rapns::Notification.where(type: 'Rapns::Wpns::Notification').delete_all
|
248
248
|
remove_column :rapns_notifications, :uri
|
249
249
|
end
|
250
250
|
end
|
@@ -257,14 +257,14 @@ class AddRpush < ActiveRecord::Migration
|
|
257
257
|
end
|
258
258
|
|
259
259
|
def self.up
|
260
|
-
add_column :rapns_apps, :client_id, :string, :
|
261
|
-
add_column :rapns_apps, :client_secret, :string, :
|
262
|
-
add_column :rapns_apps, :access_token, :string, :
|
263
|
-
add_column :rapns_apps, :access_token_expiration, :datetime, :
|
260
|
+
add_column :rapns_apps, :client_id, :string, null: true
|
261
|
+
add_column :rapns_apps, :client_secret, :string, null: true
|
262
|
+
add_column :rapns_apps, :access_token, :string, null: true
|
263
|
+
add_column :rapns_apps, :access_token_expiration, :datetime, null: true
|
264
264
|
end
|
265
265
|
|
266
266
|
def self.down
|
267
|
-
AddAdm::Rapns::Notification.where(:
|
267
|
+
AddAdm::Rapns::Notification.where(type: 'Rapns::Adm::Notification').delete_all
|
268
268
|
|
269
269
|
remove_column :rapns_apps, :client_id
|
270
270
|
remove_column :rapns_apps, :client_secret
|
@@ -339,7 +339,7 @@ class AddRpush < ActiveRecord::Migration
|
|
339
339
|
|
340
340
|
class AddFailAfterToRpushNotifications < ActiveRecord::Migration
|
341
341
|
def self.up
|
342
|
-
add_column :rpush_notifications, :fail_after, :timestamp, :
|
342
|
+
add_column :rpush_notifications, :fail_after, :timestamp, null: true
|
343
343
|
end
|
344
344
|
|
345
345
|
def self.down
|