I just committed a minor update to my award winning schema tool that allows you to write your migrations as CFM files, as well as CFCs and SQL files. The naming convention is the same (migrationNNNNNN.cfm), and the entire file represents the only minor version for that migration step.
What I've found over time is that I write almost all of my migrations in SQL, but occasionally I want one minor version that is implemented in CFML. After that one minor version, I'm back to SQL. There's no way to avoid having to create that one minor version as separate migration (since you have to change migration types), but having to implement a CFC to do it seemed like a waste. As such, CFM-based migrations were born: just write your code in a CFM, drop it in, and you're done. No subclassing, no one-case CFSWITCH, just the code.
Comments are closed.