-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add migration to handle webpush subscriptions on extension purge. #10
Add migration to handle webpush subscriptions on extension purge. #10
Conversation
TODO: add moving extension tables data over corresponding phpBB 4.0 tables etc. |
This looks weird though so there should be some instruction on how to use this to avoid board mess and/or crash. |
Oh yeah. We missed that I guess. We should prefix everything that could possibly conflict with the 4.0 implantation
…On Jan 2, 2024 at 8:03 AM -0800, rxu ***@***.***>, wrote:
@rxu commented on this pull request.
In migrations/handle_subscriptions.php:
> + * Otherwise remove all subscriptions
+ */
+ $sql = $core_webpush_exists ?
+ 'UPDATE ' . $user_notifications_table . "
+ SET method = '" . $this->db->sql_escape('notification.method.webpush') . "'
+ WHERE method = '" . $this->db->sql_escape('phpbb.wpn.notification.method.webpush') . "'" :
+
+ 'DELETE FROM ' . $user_notifications_table . "
+ WHERE method = '" . $this->db->sql_escape('phpbb.wpn.notification.method.webpush') . "'";
+
+ $this->db->sql_query($sql);
+ }
+
+ public function copy_subscription_tables()
+ {
+ $core_notification_push_table = $this->table_prefix . 'notification_push';
> Also should we copy over the API keys and enable/disabled configs too?
Oh, should we then rename current ext config parameters to something wpn-prefixed?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
71f4216
to
88aece3
Compare
We probably need to unit-test this migration somehow, f.e. create fixtures with tables and configs including ones from 4.0 PR, run the migration and assert exported values. |
91bd183
to
f85eba5
Compare
f85eba5
to
6ae4807
Compare
d1a404f
to
1463500
Compare
7a3d011
to
ffee3ad
Compare
ffee3ad
to
bfbb949
Compare
aa541b2
to
5ecc737
Compare
Closes #5.