Git Product home page Git Product logo

Comments (5)

salimane avatar salimane commented on August 20, 2024

I would be checking this sometimes later this week but as usual a pull request is always welcomed.
Thanks

from ruckusing-migrations.

ruckus avatar ruckus commented on August 20, 2024

Hmm, this is trickier than one would expect. Just shoving a printf right above the actual meat of the Migrate#run_migrations:

// OUTPUT here
printf("========= Begin: %s ======== \n", $file['class']);
$this->_adapter->start_transaction();
$result =  $obj->$target_method();
//successfully ran migration, update our version and commit
$this->_migrator_util->resolve_current_version($file['version'], $target_method);
$this->_adapter->commit_transaction();

Functionally works but the display is out of order - since the Task accumulates all output in $this->_return and then displays it at the end.

E.g.

========= Begin: CreaetFoo ========
Started: 2013-07-09 10:35am PDT

[db:migrate]:
    Migrating UP to: 20130705164951
========= Completed: CreaetFoo ======== (0.00)


Finished: 2013-07-09 10:35am PDT

Ideally we would want the ========= Begin: CreaetFoo ======== output inside the [db:migrate] block..

from ruckusing-migrations.

marcofognog avatar marcofognog commented on August 20, 2024

Is there a specific reason to why the output needs to be accumulated? Why not output everything from there?

from ruckusing-migrations.

timtonk avatar timtonk commented on August 20, 2024

@marcofognog maybe it's just a question of design. Instead of printing in every instance of migration there is a one method in RuckusFramework, which output everything

from ruckusing-migrations.

kevcam4891 avatar kevcam4891 commented on August 20, 2024

In instances where I anticipate slow queries, or major migrations, but
still want to know things are happening, I will typically fallback to
viewing tail -f of a mysql general query log. Granted, enabling the
general log will slow the process further, but sometimes I take comfort
in seeing SQL whiz through the terminal screen :)

http://dev.mysql.com/doc/refman/5.1/en/query-log.html

Dmitry Tonkonogov wrote:

@marcofognog https://github.com/marcofognog maybe it's just a
question of design. Instead of printing in every instance of migration
there is a one method in RuckusFramework, which output everything


Reply to this email directly or view it on GitHub
#107 (comment).

from ruckusing-migrations.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.