Automatically delete the old model files that Doctrine generated

Posted: August 20th, 2009 | Author: Marc | Filed under: easier | Tags: , , , | 4 Comments »

I just released another plugin for symfony 1.2! The plugin is named uvmcDoctrineTaskExtraPlugin and aims to provide some tasks to help you with Doctrine.

The task I created today is really simple but helps a lot when it comes to manage the files that doctrine created. I’m pretty sure you already had to delete all the models, forms, filters and table that doctrine generated because of a typo in your model’s name or because it suxxed. Well, now, thanks to this plugin, you’ll be able to do that in a second.

You simply have to run:

php symfony doctrine:delete-files-of-model myModelName

and it will automagically deletes every files related to this model.


4 Comments on “Automatically delete the old model files that Doctrine generated”

  1. 1 Kevin said at 22:32 on August 20th, 2009:

    Nice,

    This is going to be part of symfony core in 1.3:

    $ php symfony doctrine:delete-model-files ModelName

    &

    $ php symfony doctrine:clean-model-files
    (checks schema and auto deletes models/forms/filters)

    Another helpful feature in 1.3 is the ability to turn off the generation of forms/filters in the schema (useful for junction-table models – don’t often use their form/filters)

    http://trac.symfony-project.org/browser/branches/1.3/WHATS_NEW

  2. 2 gino pilotino said at 12:12 on September 7th, 2009:

    pretty useful but there’s no way to install it with plugin:install task (as there’s no release to download)

  3. 3 Marc said at 12:32 on September 7th, 2009:

    Well I never install plugin with a package (I prefer to use the svn:externals property).
    I’ll try to make one and publish it asap.
    Thanx for your feedback!

  4. 4 Marc said at 16:03 on September 8th, 2009:

    Package is released!


Leave a Reply