I am trying to build a Migration, where the output of one SQL statement needs to be parsed and then piped to the following migration statement .
CDbMigration::execute()
does not have a return option, any ideas how to do this? See Class Reference
While I can run the query via ActiveRecord and parse the returned output, using active records in CDbMigration is not recommended, any better solution would be helpful
As far as I know, the execute command will never return any results because it is designed to perform an execution, not a query - i.e. it sets some data in a table, rather than getting it.
Could you perhaps try this in either your up or down method as required:
$results = $this->getDBConnection()->createCommand($sql)->query();
though I would comment that if you need to do this, migration may not be the best tool for the job.