Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Generate migration from models
  • Hi ! Already please excuse my English.
    My question concerns the ORM and migrations.
    Is it possible to generate migration from the model ?
    This is expected to do in future ? Thanks !
  • Jelmer Schreuder wrote on Monday 20th of February 2012:
    The reason it won't get in is because there's a limit to how much I'm willing to support, when too much gets in things go wrong when updating and the core should always be reliable.

    I thought the point of FuelPHP was the community of developers?! If features get missed because it's just you working on them, that worries me a lot.
  • It is. But if no one in the community is willing to chip in, and only consume, then that's it. Creating and maintaining a full featured ORM is an awful lot of work. I've been maintaining one for another framework for the last couple of years, and it's no picnic, believe me. The more features go into the current ORM, the more time a core developer has to spend supporting it. Time we don't have (we all have to make money to, we're not backed/sponsored by a company like many other frameworks), and time appearently the community doesn't want to donate. We have decided our time is better spend on making the framework better, and rely more on third parties for the "commodity" stuff. For 2.0 we're going to support third party ORM's. Those are well built, documented, and maintained by a dedicated team. We will never be able to beat that.
  • Technically that should be quite easy. Write a task, load the model, fetch the properties, do a compare with the actual database table and generate the code for the migration. It is not on the roadmap, but if you add a feature request at http://github.com/fuel/core/issues the request will not get lost. (I don't think this should be in the ORM bug tracker).
  • This won't get in, I've stated that many times already but others have taken time to create 3rd party solutions. For example: https://github.com/jondavidjohn/fuel-initdb The reason it won't get in is because there's a limit to how much I'm willing to support, when too much gets in things go wrong when updating and the core should always be reliable.
  • For the people who want it the other way around (creating models from your existing database tables): https://github.com/SicoAnimal/fuel-model-generator

Howdy, Stranger!

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

In this Discussion