Question

FulePHP is a HMVC framework that allows 'modules' to have their own MVC structure. The framework also provides a handy tool called 'migration', that resolves database & code version conflicts (during development) in an elegant way.

However, the migration tool is app-wise. Management of package DB Schemae & Fixtures is not supported.

I came up with these alternative solutions :

  1. Build and test each modules with it's dependency as a FuelPHP project, so that 'migrations' can be used exclusively. Requires a whole lot of configurations, with a strict and environment (dev/production) branch policy.
  2. Scan and link files in 'APPPATH/modules/[mod_name]/migrations' to 'migrations' after updating or installing a modules.
  3. The legacy way: Maintain sql files for DB schema & fixture by hand, loaded if tables were not found at runtime.

Combining solution 1 and 2 seems reasonable, but would take a great amount of work. Is there some elegant way to do so, or to port migration support to modules?

Thanks in advance.

** edited, 'modules' should be where I'm looking for, not 'packages'

In short, I'd like to have my module directory look like:

  • classes
    • controller
    • model
    • view
  • config
  • migrations
  • lang
  • views
Was it helpful?

Solution

Migrations in packages are already supported.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top