aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1037.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Update/_1037.php')
-rw-r--r--Zotlabs/Update/_1037.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/Zotlabs/Update/_1037.php b/Zotlabs/Update/_1037.php
new file mode 100644
index 000000000..a1ad20aa8
--- /dev/null
+++ b/Zotlabs/Update/_1037.php
@@ -0,0 +1,30 @@
+<?php
+
+namespace Zotlabs\Update;
+
+class _1037 {
+function run() {
+ $r1 = q("ALTER TABLE `item` CHANGE `uri` `mid` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '',
+CHANGE `parent_uri` `parent_mid` CHAR( 255 ) CHARACTER SET ascii COLLATE ascii_general_ci NOT NULL DEFAULT '',
+ DROP INDEX `uri` ,
+ADD INDEX `mid` ( `mid` ),
+DROP INDEX `parent_uri` ,
+ADD INDEX `parent_mid` ( `parent_mid` ),
+ DROP INDEX `uid_uri` ,
+ADD INDEX `uid_mid` ( `mid` , `uid` ) ");
+
+ $r2 = q("ALTER TABLE `mail` CHANGE `uri` `mid` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
+CHANGE `parent_uri` `parent_mid` CHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
+DROP INDEX `uri` ,
+ADD INDEX `mid` ( `mid` ),
+ DROP INDEX `parent_uri` ,
+ADD INDEX `parent_mid` ( `parent_mid` ) ");
+
+ if($r1 && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+
+
+} \ No newline at end of file