diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-10-06 21:05:45 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-10-06 23:12:38 +0200 |
commit | 2eb93387c257045b746a6fb27d34a00b115158d5 (patch) | |
tree | e1f11408538523ba9ccdc3bda09eb9a97f7e6285 | |
parent | 88d28cd6fe4b764cb77ce033692132a1a76421d8 (diff) | |
download | volse-hubzilla-2eb93387c257045b746a6fb27d34a00b115158d5.tar.gz volse-hubzilla-2eb93387c257045b746a6fb27d34a00b115158d5.tar.bz2 volse-hubzilla-2eb93387c257045b746a6fb27d34a00b115158d5.zip |
fix issue #1281 - hubloc default values
(cherry picked from commit dd3ec468f65f05c0fbf233a161cffae2698bd3db)
-rw-r--r-- | Zotlabs/Update/_1224.php | 25 | ||||
-rwxr-xr-x | boot.php | 2 | ||||
-rw-r--r-- | install/schema_mysql.sql | 2 |
3 files changed, 27 insertions, 2 deletions
diff --git a/Zotlabs/Update/_1224.php b/Zotlabs/Update/_1224.php new file mode 100644 index 000000000..d687afce7 --- /dev/null +++ b/Zotlabs/Update/_1224.php @@ -0,0 +1,25 @@ +<?php + +namespace Zotlabs\Update; + +class _1224 { + + function run() { + q("START TRANSACTION"); + + if(ACTIVE_DBTYPE == DBTYPE_MYSQL) { + $r1 = q("ALTER TABLE hubloc ALTER hubloc_id_url SET DEFAULT ''"); + $r2 = q("ALTER TABLE hubloc ALTER hubloc_site_id SET DEFAULT ''"); + } + + if($r1 && $r2) { + q("COMMIT"); + return UPDATE_SUCCESS; + } + + q("ROLLBACK"); + return UPDATE_FAILED; + + } + +} @@ -54,7 +54,7 @@ define ( 'STD_VERSION', '3.8RC1.1' ); define ( 'ZOT_REVISION', '6.0a' ); -define ( 'DB_UPDATE_VERSION', 1223 ); +define ( 'DB_UPDATE_VERSION', 1224 ); define ( 'PROJECT_BASE', __DIR__ ); diff --git a/install/schema_mysql.sql b/install/schema_mysql.sql index a5db8e184..ef7e2a516 100644 --- a/install/schema_mysql.sql +++ b/install/schema_mysql.sql @@ -505,7 +505,7 @@ CREATE TABLE IF NOT EXISTS `hubloc` ( `hubloc_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `hubloc_guid` char(191) NOT NULL DEFAULT '', `hubloc_guid_sig` text NOT NULL, - `hubloc_id_url` char(191) NOT NULL DEFAULT '0', + `hubloc_id_url` char(191) NOT NULL DEFAULT '', `hubloc_hash` char(191) NOT NULL DEFAULT '', `hubloc_addr` char(191) NOT NULL DEFAULT '', `hubloc_network` char(32) NOT NULL DEFAULT '', |