Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Is there a way to use OIL to undo an OIL create or similar?
Not at the moment, but if you need it... I think it would be possible to roll back changes by implementing a log of some sort that could be parsed to roll back file creation and migration...
Yea, that sounds like a great idea! I would really want to contribute with this but, I'm currently trying to get the latest couchDB setup on AWS free tier (not easy). I'll post another question on FUEL's support for couchDB and models. I'm really excited on the possibilities of FUEL. I just hope the community grows quicker.
Not possible, nor should it be. In the same way that you cannot undo an rm -rf /home/user. Even if we kept a log it would not take into account external changes and i am strongly against re-creating functionality that already exists with version control like Git, Mercurial, Baxaar, etc.
This is more Phil's area than mine, but as he's travelling I'll give something of an "official" reaction to the idea. Not to throw cold water onto the idea, but I don't think something like this should be in the official release. I don't think everything can be undone, and some things already offer similar functionality already (migrate up/down). Also how would you "undo" if your operation has overwritten something? All of that might lead to ambiguous behavior and nothing in the official package has the luxery to allow for ambiguity. Best way would probably be to extend some parts of Oil to allow for this and package that. Having said that, if you code up something awesome than I can imagine or if Phil disagrees with me it could of course go in. But best approach would probably to create a package that is capable of this and after that we can always decide to intergrate it.
I wasn't suggesting to put it in core, but you could create a package to extend oils capabilities for use in your own projects. I personally will just undo by hand... not all that difficult.
Or just type a little more carefully
I agree that if something gets overwritten it may cause problems undoing. However, keeping track (logging) of create methods can be useful in the following example: Let's say, you create "Blog" and all of its models and folder structures. But then, you decide to create a "CMS" that handles blogging too. You may just want to remove all of "Blog". Or, say you create a "Test" and then just want to remove it. By the way, where can I find more info, or examples, on creating packages like you mentioned?
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion