Closed karlhorky closed 4 years ago
@karlhorky any windows tip?
For Windows I generally suggest having a Bash command line installed (so that commands like this just work out of the box).
Either of the following should work well:
Thanks :) Merging, but will be adding a new
command that takes care of this.
Great, sounds good, thanks!
Now available within v0.5.0 ::
# Sequential
$ ley new users #=> migrations/00000-users.js
$ ley new teams #=> migrations/00001-teams.js
# Timestamp
$ ley new users --timestamp #=> migrations/1584389617-users.js
$ ley new teams --timestamp #=> migrations/1584389631-teams.js
# Customize Filename / Extension
$ ley new users.ts #=> migrations/#####-users.ts
$ ley new create-teams #=> migrations/#####-create-teams.js
$ ley new "alter admin users" #=> migrations/#####-alter-admin-users.js
# Modify Prefix Length (non-timestamp only)
$ ley new users.ts --length 3 #=> migrations/###-users.ts
Works on Windows, too :)
Add @lukeed's tip from #2 about creating timestamped migration files to the readme.