I'm fairly new to FuelPHP and therefore wonder about a "best practice". I'm using ORM for two projects I'm working on and wonder if we can/should use it in a migration script.
There are cases where I'd like to add some default values to tables created in a migration script. A user "guest", a group called "anonymous" or a bunch of "categories" I'd like to add.
ORM models don't seem to be available in a migration script.
ORM Models should be available without problems, like any other classes. Providing the Orm package is loaded, and the model class is loadable (if in a module you might have to load that module too).
We do everything related to upgrades in migrations, database changes are actually a minority of the actions. So that also include loading new base data, re-ordering of data after structural DB changes, etc.
We usually use plain DB queries though, in case no ORM specific logic is needed, they're faster then ORM calls