Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F727060
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
Mon, Jan 6, 5:47 AM
Size
661 B
Mime Type
text/x-diff
Expires
Tue, Jan 7, 5:47 AM (2 d, 22 h ago)
Engine
blob
Format
Raw Data
Handle
537126
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