From: Chimo Date: Sat, 7 Feb 2015 15:46:13 +0000 (-0500) Subject: Remove NOT NULL restriction on HubSub 'lease' X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=937adf05c9c248848cdb0e9df6864611ceb8047f;p=quix0rs-gnu-social.git Remove NOT NULL restriction on HubSub 'lease' This fixes an issue where INSERTs in HubSub fail if MySQL/MariaDB is running in "strict mode" since the default lease time in PushHubAction::subunsub is null. Permanent subscriptions have been removed in PuSH v0.4, but they are being kept here for backward-compatibility with previous GS/SN versions. --- diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php index 30c32ac1aa..96c6986cdf 100644 --- a/plugins/OStatus/classes/HubSub.php +++ b/plugins/OStatus/classes/HubSub.php @@ -58,7 +58,7 @@ class HubSub extends Managed_DataObject 'topic' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'HubSub topic'), 'callback' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'HubSub callback'), 'secret' => array('type' => 'text', 'description' => 'HubSub stored secret'), - 'lease' => array('type' => 'int', 'not null' => true, 'description' => 'HubSub leasetime'), + 'lease' => array('type' => 'int', 'description' => 'HubSub leasetime'), 'sub_start' => array('type' => 'datetime', 'description' => 'subscription start'), 'sub_end' => array('type' => 'datetime', 'description' => 'subscription end'), 'created' => array('type' => 'datetime', 'not null' => true, 'description' => 'date this record was created'),