We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Create an empty table migration

So, is there no way to create an empty table migration with dev-tools? Say I want to add a couple of new tables to my database, I would like to be able to run something like phalcon migration generate --descr=shoots_contacts_leads_tables --table=contacts,leads and have dev-tools create the boilerplate migration files for me.

It looks like I have to create the table in the DB, then run dev-tools OR create the migration files by hand. Coming from other frameworks, this is a completely different workflow than I am accustomed to using. It's not a bad one, but I prefer creating only the migrations that are actually affecting changes to the DB without touching any of the other tables at all, and I like to code the migration then run it on my end to make sure everything works.

Any thoughts? I may implement this on my end if I get some spare time.

edited Nov '16

I guess you're right. Migrations in Phalcon are not full blown as one might expect, in other words you need to go straight through the database.