I have been researching a way to get the SQL statements that are built by a generated Migration file. These extend Doctrine_Migration_Base. Essentially I would like to save the SQL as change scripts.
The execution path leads me to Doctrine_Export which has methods that build the SQL statement and executes them. I have found no way of asking for just them. The export methods found in Doctrine_Export only operate on Doctrine_Record models and not Migration scripts.
From the command line './doctrine migrate version#' the path goes:
- Doctrine_Cli::run(cmd)
- Doctrine_Task_Migrate::setArguments(args)
- Doctrine_Task_Migrate::execute()
- Doctrine_Migration::migrate(to)
- Doctrine_Migration_Process::Doctrine_Export::various create, drop, alter methods with sql equivalents.
Has anyone tackled this before? I really would not like to change Doctrine base files. Any help is greatly appreciated.