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.
This commit is contained in:
Chimo 2015-02-07 10:46:13 -05:00
parent 1c478768ad
commit 937adf05c9

View File

@ -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'),