Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 574793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:52:10+00:00 2026-05-13T13:52:10+00:00

I have been researching a way to get the SQL statements that are built

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T13:52:11+00:00Added an answer on May 13, 2026 at 1:52 pm

    Taking into account Rob Farley’s suggestion, I modified:

    • Doctrine_Core::migrate
    • Doctrine_Task_Migrate::execute

    When the execute method is called the optional argument ‘dryRun’ is checked. If true
    then a ‘Doctrine_Connection_Profiler’ instance is created. The ‘dryRun’ value is then passed onto
    the ‘Doctrine_Core::migrate’ method. The ‘dryRun’ value of true allows the changes to rollback when done executing the SQL statements. When the method returns, the profiler is parsed and non-empty SQL statements
    not containing ‘migration_version’ are saved and displayed to the terminal.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been researching asynchronous messaging, and I like the way it elegantly deals
I have been researching audit triggers for some of my sql tables. I came
I have recently been web-researching quantum computing. Will we see these in our lifetimes
I have been researching around trying to find the best way to begin developing
I have been researching and playing with functional programming lately, solely to broaden my
I have been researching options for printing report-like data via a web application. Some
Have been looking at the MVC storefront and see that IQueryable is returned from
Have been studying the file system related classes of Adobe AIR 1.5, but so
I have been researching RIA services with silverlight 4 and considering using it. Switching
We have been using CruiseControl for quite a while with NUnit and NAnt. For

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.