diff --git a/app/src/Command/TransmogrifyCommand.php b/app/src/Command/TransmogrifyCommand.php index eb70e4ead..d8ecb4bcd 100644 --- a/app/src/Command/TransmogrifyCommand.php +++ b/app/src/Command/TransmogrifyCommand.php @@ -134,6 +134,7 @@ class TransmogrifyCommand extends Command { ], 'person_roles' => [ 'source' => 'cm_co_person_roles', + 'sqlSelect' => 'roleSqlSelect', 'displayField' => 'id', // We don't currently need status specifically, just that the role exists 'cache' => [ 'status' ], @@ -1287,6 +1288,48 @@ protected function processExtendedAttributes() { } } + /** + * Return SQL used to select CO Person Roles from inbound database. + * + * @since COmanage Registry v5.0.0 + * @param string $tableName Name of the SQL table + * @return string SQL string to select rows from inbound database + */ + + protected function roleSqlSelect(string $tableName): string { + // Cast the affiliation value to 'member' when NULL or empty string. + define("ROLE_SQL_SELECT", <<outconn->qualifyTableName($tableName); $this->outconn->insert($qualifiedTableName, $roleRow); } -} +} \ No newline at end of file