Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1098712
D149.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
Thu, Aug 14, 4:48 AM
Size
661 B
Mime Type
text/x-diff
Expires
Fri, Aug 15, 4:48 AM (5 h, 9 m)
Engine
blob
Format
Raw Data
Handle
710325
Attached To
D149: INP-1497 - Detect primary key of "email-template" unit automatically during upgrade
D149.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