From 937adf05c9c248848cdb0e9df6864611ceb8047f Mon Sep 17 00:00:00 2001 From: Chimo Date: Sat, 7 Feb 2015 10:46:13 -0500 Subject: [PATCH] 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. --- plugins/OStatus/classes/HubSub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'), -- 2.39.5