From b2cfbded2edce0aa835ac9d589e7055c7a77d25b Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 15 Mar 2016 16:52:57 +0100 Subject: [PATCH] Upgrading from 1.1.x would make uri fields have length=255 --- plugins/ActivityModeration/classes/Deleted_notice.php | 1 + plugins/Event/classes/RSVP.php | 1 + 2 files changed, 2 insertions(+) diff --git a/plugins/ActivityModeration/classes/Deleted_notice.php b/plugins/ActivityModeration/classes/Deleted_notice.php index 4ffc0c895f..af31b6dbef 100644 --- a/plugins/ActivityModeration/classes/Deleted_notice.php +++ b/plugins/ActivityModeration/classes/Deleted_notice.php @@ -193,6 +193,7 @@ class Deleted_notice extends Managed_DataObject echo "\nFound old $table table, upgrading it to add 'act_created' field..."; $schemadef['fields']['act_created'] = array('type' => 'datetime', 'not null' => true, 'description' => 'datetime the notice record was created'); + $schemadef['fields']['uri']['length'] = 191; // we likely don't have to discover too long keys here $schema->ensureTable($table, $schemadef); $deleted = new Deleted_notice(); diff --git a/plugins/Event/classes/RSVP.php b/plugins/Event/classes/RSVP.php index 84cbd624dc..f2ab8f0aa3 100644 --- a/plugins/Event/classes/RSVP.php +++ b/plugins/Event/classes/RSVP.php @@ -107,6 +107,7 @@ class RSVP extends Managed_DataObject echo "\nFound old $table table, upgrading it to add 'event_uri' field..."; $schemadef['fields']['event_uri'] = array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'Event URI'); + $schemadef['fields']['uri']['length'] = 191; // we likely don't have to discover too long keys here $schema->ensureTable($table, $schemadef); $rsvp = new RSVP();