Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mikeryan776/73dfcdecbb12741e16f39ca757785126 to your computer and use it in GitHub Desktop.
Save mikeryan776/73dfcdecbb12741e16f39ca757785126 to your computer and use it in GitHub Desktop.
market_file_media patch
diff --git a/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php b/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php
index 877110db..ef66a5df 100644
--- a/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php
+++ b/docroot/modules/custom/schwab_migrate/src/Plugin/migrate/source/MarketFileMedia.php
@@ -19,10 +19,10 @@ class MarketFileMedia extends SqlBase {
public function query() {
// Determine the migrated files from the map table, and get the actual data
// from file_managed.
- $query = $this->select('migrate_map_market_file', 'map');
- $query->condition('map.source_row_status', 0);
- $query->addField('map', 'sourceid1');
- $query->innerJoin('file_managed', 'f', 'map.destid1 = f.fid');
+ $query = $this->select('migrate_map_market_file', 'market_file_map');
+ $query->condition('market_file_map.source_row_status', 0);
+ $query->addField('market_file_map', 'sourceid1');
+ $query->innerJoin('file_managed', 'f', 'market_file_map.destid1 = f.fid');
$query->fields('f', [
'fid',
'filename',
@@ -39,7 +39,7 @@ public function query() {
*/
public function getIds() {
$ids['sourceid1']['type'] = 'string';
- $ids['sourceid1']['alias'] = 'map';
+ $ids['sourceid1']['alias'] = 'market_file_map';
return $ids;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment