HeliosInteractive / sails-generate-migrate

Migration script generator for db-migrate with sails
MIT License
0 stars 1 forks source link

Creating Empty SQL Scripts #1

Open onatbas opened 7 years ago

onatbas commented 7 years ago

I'm executing this on a simple model with only name in it. sails generate migrate create User --sql-file

And the sql files that re being generated are completely empty.

Is this tool in working state?

mneil commented 7 years ago

Yes it is and that is the current expected behavior. As documented it uses db-migrate under the hood. You are responsible for writing the migration script.

You can use the migrate up command to run the migration after you have filled in the file or install sails-hook-migrate.

In the future I would like to have it try and detect changes to your models so it write the migration for you.