Closed philsturgeon closed 13 years ago
Yes, it's very weak, but it was super fast to write! :-)
Good points and one thing I've run into is bad SQL files breaking my migrations since there is no good transaction wrappers.
I'll start working on another version, it's just sad you can't build a nice DSL in PHP like Ruby.
Damn right, add_column :foo, :bar, :string is lovely!
Here is my Fuel implementation for Migrations. Fuel isn ot all that different from Kohana in many places so much of it should apply. :)
This looks like a decent model to work off of.
Hey,
Although this is awesome code, basing your migrations around .sql files is a bit weak. In Rails, CodeIgniter and Fuel migrations are done with .rb or .php files, which means you can run SQL and any other code too.
For example, if I add a new column to a table and my model or controller is expecting that value, I'll need to clear the cache to stop a PHP errors popping up. This is only one of several possible examples.
Run a PHP file and you can do lots more. :)