Ever get tired of running the same knex commands every time you need to reset your database? Why not just make a bash script that will run them all in one command?
#!/bin/bash knex migrate:rollback knex migrate:latest knex seed:run
I named mine
dbrefresh so now anytime I need my database to be reset all I need to do is type
dbrefresh inside my terminal and it will rollback, magrate latest and run my seeds in one sweet and easy command.
Thank you very much for reading! Do you have any bash scripts that you use everyday? I've love to see them in the comments below!