sql-migrate
sql-migrate copied to clipboard
Possibility to configure the date format for the prefix
Add a configuration option within the configuration file that allows to
override the default date format used to prefix the sql
files.
The format can be set globally or per environment.
See #23 for discussions.
Nice!
Some people expressed interest in having different prefixes (most common I can think of would be an incrementing integer). We don't have to implement these right now, but let's just take a moment to think about how the config file would evolve if more options are added. Getting it right will ensure that we're in a good place for the foreseeable future.
Whatever we add to the config file now should stay the same when more prefix types are added. We should also carefully design the way this is switched such that we never break backwards compatibility with config files.
Another issue is the use of global variables. Should we introduce a special environment that contains these? Or shall we keep adding global variables along-side the environments?
I think that having a global one and giving the opportunity to the user to override it for some reason is nice.
I think it will be difficult to provide a simple and general way to produce prefix for everyone. We could offer a template string with a lot of predefined functions ? Could the plugins of Go1.8 be an other solution?