Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1170209
D149.id387.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Sep 27, 12:21 AM
Size
661 B
Mime Type
text/x-diff
Expires
Sun, Sep 28, 12:21 AM (15 h, 24 s)
Engine
blob
Format
Raw Data
Handle
758187
Attached To
D149: INP-1497 - Detect primary key of "email-template" unit automatically during upgrade
D149.id387.diff
View Options
Index: branches/5.2.x/core/install/upgrades.php
===================================================================
--- branches/5.2.x/core/install/upgrades.php
+++ branches/5.2.x/core/install/upgrades.php
@@ -2058,6 +2058,11 @@
$table_name = $this->Application->getUnitOption('email-template', 'TableName');
$fields = $this->Conn->Query('DESCRIBE ' . $table_name, 'Field');
+ // The "_renameTables" method doesn't rename IDField, so find real one in DESCRIBE result.
+ if ( !isset($fields[$id_field]) ) {
+ $id_field = 'EventId';
+ }
+
if ( !isset($fields['l1_Body']) ) {
// column dropped - nothing to convert anymore
return;
Event Timeline
Log In to Comment