Florianschmidtwelzow has uploaded a new change for review.
https://gerrit.wikimedia.org/r/148426
Change subject: Start with value 1 instead of 0
......................................................................
Start with value 1 instead of 0
MySQL will interpret value 0 as "get next value" of an autoincrement column,
which causes an "key already exist" when trying to add value 1 manually (1
already exist from value 0). Start with ID 1 instead of 0 to solve this
without changing mode.
Bug: 68388
Change-Id: I3c7e9dea59f685be7360faf666075f4f4985442d
---
M CentralNotice.sql
1 file changed, 5 insertions(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice
refs/changes/26/148426/1
diff --git a/CentralNotice.sql b/CentralNotice.sql
index 5b5c560..536c80e 100644
--- a/CentralNotice.sql
+++ b/CentralNotice.sql
@@ -75,11 +75,11 @@
`dev_display_label` varchar(255) binary NOT NULL
) /*$wgDBTableOptions*/;
CREATE INDEX /*i*/dev_name ON /*_*/cn_known_devices (dev_name);
-INSERT INTO /*_*/cn_known_devices VALUES (0, 'desktop',
'{{int:centralnotice-devicetype-desktop}}');
-INSERT INTO /*_*/cn_known_devices VALUES (1, 'android',
'{{int:centralnotice-devicetype-android}}');
-INSERT INTO /*_*/cn_known_devices VALUES (2, 'iphone',
'{{int:centralnotice-devicetype-iphone}}');
-INSERT INTO /*_*/cn_known_devices VALUES (3, 'ipad',
'{{int:centralnotice-devicetype-ipad}}');
-INSERT INTO /*_*/cn_known_devices VALUES (4, 'unknown',
'{{int:centralnotice-devicetype-unknown}}');
+INSERT INTO /*_*/cn_known_devices VALUES (1, 'desktop',
'{{int:centralnotice-devicetype-desktop}}');
+INSERT INTO /*_*/cn_known_devices VALUES (2, 'android',
'{{int:centralnotice-devicetype-android}}');
+INSERT INTO /*_*/cn_known_devices VALUES (3, 'iphone',
'{{int:centralnotice-devicetype-iphone}}');
+INSERT INTO /*_*/cn_known_devices VALUES (4, 'ipad',
'{{int:centralnotice-devicetype-ipad}}');
+INSERT INTO /*_*/cn_known_devices VALUES (5, 'unknown',
'{{int:centralnotice-devicetype-unknown}}');
CREATE TABLE IF NOT EXISTS /*_*/cn_template_devices (
`tdev_id` int PRIMARY KEY AUTO_INCREMENT,
--
To view, visit https://gerrit.wikimedia.org/r/148426
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c7e9dea59f685be7360faf666075f4f4985442d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits