Bsitu has uploaded a new change for review.
https://gerrit.wikimedia.org/r/55835
Change subject: remove echo_subscription table from codebase
......................................................................
remove echo_subscription table from codebase
Remove echo_subscription from codebase since Echo will not support
subscription. db change usually comes before code deployment, do not
merge/apply the db change till patch 47612 is deployed
Change-Id: I9f6d4041b16c6d1d0414ee8e81536a59d0aba3d4
---
M Hooks.php
A db_patches/patch-drop-echo_subscription.sql
M echo.sql
3 files changed, 4 insertions(+), 13 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Echo
refs/changes/35/55835/1
diff --git a/Hooks.php b/Hooks.php
index dc9a873..b42d1fa 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -69,7 +69,7 @@
public static function getSchemaUpdates( $updater ) {
$dir = __DIR__;
$baseSQLFile = "$dir/echo.sql";
- $updater->addExtensionTable( 'echo_subscription', $baseSQLFile
);
+ $updater->addExtensionTable( 'echo_event', $baseSQLFile );
$updater->addExtensionTable( 'echo_email_batch',
"$dir/db_patches/echo_email_batch.sql" );
$updater->modifyField( 'echo_event', 'event_agent',
@@ -82,6 +82,7 @@
"$dir/db_patches/patch-event_agent_ip-size.sql", true );
$updater->addExtensionField( 'echo_notification',
'notification_bundle_base',
"$dir/db_patches/patch-notification-bundling-field.sql"
);
+ $updater->dropTable( 'echo_subscription' );
return true;
}
diff --git a/db_patches/patch-drop-echo_subscription.sql
b/db_patches/patch-drop-echo_subscription.sql
new file mode 100644
index 0000000..f04a4f0
--- /dev/null
+++ b/db_patches/patch-drop-echo_subscription.sql
@@ -0,0 +1,2 @@
+-- drop this table because subscription is not supported
+DROP TABLE /*_*/echo_subscription;
diff --git a/echo.sql b/echo.sql
index acdead2..79a6ad5 100644
--- a/echo.sql
+++ b/echo.sql
@@ -1,17 +1,5 @@
-- Database Schema for Echo notification system
-CREATE TABLE /*_*/echo_subscription (
- sub_user int unsigned not null,
- sub_event_type varchar(64) binary not null,
- sub_page_namespace int unsigned null,
- sub_page_title varchar(255) binary null,
- sub_notify_type varchar(64) binary not null,
- sub_enabled tinyint(1) unsigned not null default 1
-) /*$wgDBTableOptions*/;
-
-CREATE UNIQUE INDEX /*i*/user_subscriptions ON /*_*/echo_subscription
(sub_user,sub_event_type,sub_page_namespace,sub_page_title,sub_notify_type,sub_enabled);
-CREATE INDEX /*i*/page_subscriptions ON /*_*/echo_subscription
(sub_page_namespace,sub_page_title,sub_event_type,sub_user);
-
CREATE TABLE /*_*/echo_event (
event_id int unsigned not null primary key auto_increment,
event_timestamp binary(14) not null,
--
To view, visit https://gerrit.wikimedia.org/r/55835
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f6d4041b16c6d1d0414ee8e81536a59d0aba3d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bsitu <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits