Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
How do I upgrade a package?
  • I have a package I have written, and added a new model to it and a migrate script to create the database table for that model. I assume the package migrate script can be run through oil so that the database table can be created. What is the syntax to do that? I have tried guessing (since this is not documented anywhere consistently) the syntax, but have had no luck, e.g.
    $ php oil refine migrate package my_package
    Already on latest migration for app:default.
    

    Any clues how this should work?
  • Okay, I found this:
    php oil refine help
    

    which led to this:
    php oil refine migrate:help
    

    which gave me this:
    php oil refine migrate
    

    However, it also lists options that can be added, --packages being the important one in my case:
    php oil refine migrate --packages
    

    That did the trick:
    $ php oil refine migrate --packages
    Migrated package:my_package to latest version: 1.
    Already on latest migration for package:sentry.
    

    That isn't documented *anywhere* except several layers deep within the oil command internal help. In fact, the help text is in Fuel core (core/tasks/migrate.php), and not the oil module. No wonder I was scratching my head trying to find an answer on Google. What can be done to improve this? Can help pages be written once, and pulled into both the command line, and into the website for Google searches?
  • This functionality is pretty recent, and whoever added it to 1.1/develop didn't update the documentation. I've added a note about module and packages support to the main migrations page. The documentation is online, in it's own github repository. You can always add missing stuff and send us a pull request. Or create an issue if you find something is missing.
  • Harro Verton wrote on Tuesday 10th of April 2012:
    The documentation is online, in it's own github repository.

    I'll give that a go. I've never done a pull request before, so it will be good to learn how. Ta, -- JJ
  • Harro Verton wrote on Tuesday 10th of April 2012:
    This functionality is pretty recent, and whoever added it to 1.1/develop didn't update the documentation. I've added a note about module and packages support to the main migrations page. The documentation is online, in it's own github repository. You can always add missing stuff and send us a pull request. Or create an issue if you find something is missing.

    The functionality has been there for 6 months...
  • Daniel Petrie wrote on Tuesday 10th of April 2012:
    The functionality has been there for 6 months...

    I did look in git, and the files have not been changed since October last year. I was just assuming "recent" is a relative thing in a project, and depends on how busy people are, and it seems busy on other parts of the project. At least I know where to contribute to the docs now.
  • With recent I meant "since the last release", time is indeed relative... The functionality was introduced by dpetrie, so he's to blame for the lack of documentation... :)
  • Harro Verton wrote on Wednesday 11th of April 2012:
    With recent I meant "since the last release", time is indeed relative... The functionality was introduced by dpetrie, so he's to blame for the lack of documentation... :)

    It's in 1.1 master as well.. so it is in the latest release. I didn't document it because I added it during the time when the docs were getting a huge overhaul so I was told not to bother.
  • Ah, I see. Who can I shoot? :)
  • Obviously gang up to shoot the messenger //Jason ducks
  • What I've found: http://docs.fuelphp.com/packages/oil/package.html (update "comming soon") The oil command gives this syntax when run: php oil [cell|console|generate|refine|help|test] The above page describes this, which is not in the oil syntax): php oil package ... The introduction page that oil points at, only touches on what oil is for: http://docs.fuelphp.com/packages/oil/intro.html In all, there is a distinct lack of documentation on oil, and none of that documentation has been updated in a long time. Google does not bring back any more clues. Are people really using it?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion