Everytime Scripts

Everytime scripts are scripts that are run everytime grate runs, regardless of changes.

If you name your file with .EVERYTIME., grate will run that file everytime, regardless of changes. For example, if you name a file Something.EVERYTIME.sql or EVERYTIME.something.sql, grate will run that file on each migration.

Why would I use this?

This is handy when you are using a script to drop and insert data or you need certain scripts to run everytime (say they do some sort of autowiring).

Folders

Scripts in the following folders are treated as Everytime scripts by default, and do not require special naming:

  • Permissions

Where not to use

  • The up folder - This folder is meant for scripts that run only once and it can be confusing to have everytime scripts in here. That said it will work just fine, so you do you…