Merge "Change DB column types from "string" to "binary" (VARCHAR to VARBINARY in MySQL)"

This commit is contained in:
jenkins-bot 2021-05-04 15:33:19 +00:00 committed by Gerrit Code Review
commit c618139b9c
4 changed files with 12 additions and 15 deletions

View file

@ -14,7 +14,7 @@
{ {
"name": "sub_item", "name": "sub_item",
"comment": "Internal name used to identify this item across all pages and revisions where it might appear, see CommentParser::computeName()", "comment": "Internal name used to identify this item across all pages and revisions where it might appear, see CommentParser::computeName()",
"type": "string", "type": "binary",
"options": { "options": {
"notnull": true, "notnull": true,
"length": 255 "length": 255
@ -32,7 +32,7 @@
{ {
"name": "sub_title", "name": "sub_title",
"comment": "Title of the page where this item appeared when the user subscribed to it", "comment": "Title of the page where this item appeared when the user subscribed to it",
"type": "string", "type": "binary",
"options": { "options": {
"notnull": true, "notnull": true,
"length": 255 "length": 255
@ -41,7 +41,7 @@
{ {
"name": "sub_section", "name": "sub_section",
"comment": "Section of the page where this item appeared when the user subscribed to it", "comment": "Section of the page where this item appeared when the user subscribed to it",
"type": "string", "type": "binary",
"options": { "options": {
"notnull": true, "notnull": true,
"length": 255 "length": 255

View file

@ -4,10 +4,10 @@
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes -- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE /*_*/discussiontools_subscription ( CREATE TABLE /*_*/discussiontools_subscription (
sub_id INT UNSIGNED AUTO_INCREMENT NOT NULL, sub_id INT UNSIGNED AUTO_INCREMENT NOT NULL,
sub_item VARCHAR(255) NOT NULL, sub_item VARBINARY(255) NOT NULL,
sub_namespace INT DEFAULT 0 NOT NULL, sub_namespace INT DEFAULT 0 NOT NULL,
sub_title VARCHAR(255) NOT NULL, sub_title VARBINARY(255) NOT NULL,
sub_section VARCHAR(255) NOT NULL, sub_section VARBINARY(255) NOT NULL,
sub_state INT DEFAULT 1 NOT NULL, sub_state INT DEFAULT 1 NOT NULL,
sub_user INT UNSIGNED NOT NULL, sub_user INT UNSIGNED NOT NULL,
sub_created BINARY(14) NOT NULL, sub_created BINARY(14) NOT NULL,

View file

@ -4,10 +4,10 @@
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes -- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE discussiontools_subscription ( CREATE TABLE discussiontools_subscription (
sub_id SERIAL NOT NULL, sub_id SERIAL NOT NULL,
sub_item VARCHAR(255) NOT NULL, sub_item TEXT NOT NULL,
sub_namespace INT DEFAULT 0 NOT NULL, sub_namespace INT DEFAULT 0 NOT NULL,
sub_title VARCHAR(255) NOT NULL, sub_title TEXT NOT NULL,
sub_section VARCHAR(255) NOT NULL, sub_section TEXT NOT NULL,
sub_state INT DEFAULT 1 NOT NULL, sub_state INT DEFAULT 1 NOT NULL,
sub_user INT NOT NULL, sub_user INT NOT NULL,
sub_created TIMESTAMPTZ NOT NULL, sub_created TIMESTAMPTZ NOT NULL,

View file

@ -4,14 +4,11 @@
-- See https://www.mediawiki.org/wiki/Manual:Schema_changes -- See https://www.mediawiki.org/wiki/Manual:Schema_changes
CREATE TABLE /*_*/discussiontools_subscription ( CREATE TABLE /*_*/discussiontools_subscription (
sub_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, sub_id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
sub_item VARCHAR(255) NOT NULL, sub_item BLOB NOT NULL, sub_namespace INTEGER DEFAULT 0 NOT NULL,
sub_namespace INTEGER DEFAULT 0 NOT NULL, sub_title BLOB NOT NULL, sub_section BLOB NOT NULL,
sub_title VARCHAR(255) NOT NULL,
sub_section VARCHAR(255) NOT NULL,
sub_state INTEGER DEFAULT 1 NOT NULL, sub_state INTEGER DEFAULT 1 NOT NULL,
sub_user INTEGER UNSIGNED NOT NULL, sub_user INTEGER UNSIGNED NOT NULL,
sub_created BLOB NOT NULL, sub_created BLOB NOT NULL, sub_notified BLOB DEFAULT NULL
sub_notified BLOB DEFAULT NULL
); );
CREATE UNIQUE INDEX discussiontools_subscription_itemuser ON /*_*/discussiontools_subscription (sub_item, sub_user); CREATE UNIQUE INDEX discussiontools_subscription_itemuser ON /*_*/discussiontools_subscription (sub_item, sub_user);