summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-12-20 10:54:58 -0500
committerBrian Evans <grknight@gentoo.org>2018-12-20 10:54:58 -0500
commite8c28f1b9df13f9cca5a6f5125b75ccff4f164ba (patch)
tree7535ff01e954a0e98fb8b945ae77b28d5e1a1771 /CommentStreams/sql
parentCommentStreams: backport enable tag code (diff)
downloadextensions-e8c28f1b9df13f9cca5a6f5125b75ccff4f164ba.tar.gz
extensions-e8c28f1b9df13f9cca5a6f5125b75ccff4f164ba.tar.bz2
extensions-e8c28f1b9df13f9cca5a6f5125b75ccff4f164ba.zip
CommentStreams: Update to 4.5
Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'CommentStreams/sql')
-rw-r--r--CommentStreams/sql/commentData.sql15
-rw-r--r--CommentStreams/sql/dropForeignKey1.sql2
-rw-r--r--CommentStreams/sql/dropForeignKey2.sql2
-rw-r--r--CommentStreams/sql/updateFieldNames.sql9
-rw-r--r--CommentStreams/sql/votes.sql10
-rw-r--r--CommentStreams/sql/watch.sql8
6 files changed, 29 insertions, 17 deletions
diff --git a/CommentStreams/sql/commentData.sql b/CommentStreams/sql/commentData.sql
index 00b8fead..d8d26d73 100644
--- a/CommentStreams/sql/commentData.sql
+++ b/CommentStreams/sql/commentData.sql
@@ -1,9 +1,8 @@
-CREATE TABLE IF NOT EXISTS cs_comment_data
+CREATE TABLE IF NOT EXISTS /*_*/cs_comment_data
(
-page_id int(10) unsigned,
-assoc_page_id int(10) unsigned,
-parent_page_id int(10) unsigned,
-comment_title varbinary(255),
-PRIMARY KEY (page_id),
-FOREIGN KEY (assoc_page_id) REFERENCES page(page_id)
-); \ No newline at end of file
+cst_page_id int(10) unsigned,
+cst_assoc_page_id int(10) unsigned,
+cst_parent_page_id int(10) unsigned,
+cst_comment_title varbinary(255),
+PRIMARY KEY (cst_page_id)
+);
diff --git a/CommentStreams/sql/dropForeignKey1.sql b/CommentStreams/sql/dropForeignKey1.sql
new file mode 100644
index 00000000..a8b4d946
--- /dev/null
+++ b/CommentStreams/sql/dropForeignKey1.sql
@@ -0,0 +1,2 @@
+ALTER TABLE /*_*/cs_comment_data DROP FOREIGN KEY cs_comment_data_ibfk_1;
+ALTER TABLE /*_*/cs_comment_data DROP INDEX assoc_page_id;
diff --git a/CommentStreams/sql/dropForeignKey2.sql b/CommentStreams/sql/dropForeignKey2.sql
new file mode 100644
index 00000000..f2f7ae44
--- /dev/null
+++ b/CommentStreams/sql/dropForeignKey2.sql
@@ -0,0 +1,2 @@
+ALTER TABLE /*_*/cs_comment_data DROP FOREIGN KEY cs_comment_data_ibfk_1;
+ALTER TABLE /*_*/cs_comment_data DROP INDEX cst_assoc_page_id;
diff --git a/CommentStreams/sql/updateFieldNames.sql b/CommentStreams/sql/updateFieldNames.sql
new file mode 100644
index 00000000..5f4526bf
--- /dev/null
+++ b/CommentStreams/sql/updateFieldNames.sql
@@ -0,0 +1,9 @@
+ALTER TABLE /*_*/cs_comment_data CHANGE page_id cst_page_id int(10) unsigned;
+ALTER TABLE /*_*/cs_comment_data CHANGE assoc_page_id cst_assoc_page_id int(10) unsigned;
+ALTER TABLE /*_*/cs_comment_data CHANGE parent_page_id cst_parent_page_id int(10) unsigned;
+ALTER TABLE /*_*/cs_comment_data CHANGE comment_title cst_comment_title varbinary(255);
+ALTER TABLE /*_*/cs_votes CHANGE page_id cst_v_page_id int(10) unsigned NOT NULL;
+ALTER TABLE /*_*/cs_votes CHANGE user_id cst_v_user_id int(10) unsigned NOT NULL;
+ALTER TABLE /*_*/cs_votes CHANGE vote cst_v_vote tinyint NOT NULL;
+ALTER TABLE /*_*/cs_watchlist CHANGE page_id cst_wl_page_id int(10) unsigned NOT NULL;
+ALTER TABLE /*_*/cs_watchlist CHANGE user_id cst_wl_user_id int(10) unsigned NOT NULL;
diff --git a/CommentStreams/sql/votes.sql b/CommentStreams/sql/votes.sql
index 4e232eb2..cffdcb27 100644
--- a/CommentStreams/sql/votes.sql
+++ b/CommentStreams/sql/votes.sql
@@ -1,7 +1,7 @@
-CREATE TABLE IF NOT EXISTS cs_votes
+CREATE TABLE IF NOT EXISTS /*_*/cs_votes
(
-page_id int(10) unsigned NOT NULL,
-user_id int(10) unsigned NOT NULL,
-vote tinyint NOT NULL,
-INDEX (page_id, user_id)
+cst_v_page_id int(10) unsigned NOT NULL,
+cst_v_user_id int(10) unsigned NOT NULL,
+cst_v_vote tinyint NOT NULL,
+INDEX (cst_v_page_id, cst_v_user_id)
);
diff --git a/CommentStreams/sql/watch.sql b/CommentStreams/sql/watch.sql
index 4e3dbf61..33e05ae4 100644
--- a/CommentStreams/sql/watch.sql
+++ b/CommentStreams/sql/watch.sql
@@ -1,6 +1,6 @@
-CREATE TABLE IF NOT EXISTS cs_watchlist
+CREATE TABLE IF NOT EXISTS /*_*/cs_watchlist
(
-page_id int(10) unsigned NOT NULL,
-user_id int(10) unsigned NOT NULL,
-INDEX (page_id, user_id)
+cst_wl_page_id int(10) unsigned NOT NULL,
+cst_wl_user_id int(10) unsigned NOT NULL,
+INDEX (cst_wl_page_id, cst_wl_user_id)
);