Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to configure the date format for the prefix #57

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Possibility to configure the date format for the prefix #57

wants to merge 2 commits into from

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