Skip to content

Conversation

yageek
Copy link
Contributor

@yageek yageek commented Feb 7, 2017

Add a configuration option within the configuration file that allows to
override the default date format used to prefix the sqlfiles.

The format can be set globally or per environment.

See #23 for discussions.

Add details about how to configure the prefix.
@rubenv
Copy link
Owner

rubenv commented Feb 7, 2017

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?

@yageek
Copy link
Contributor Author

yageek commented Feb 7, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants