Skip to content

Add command to upgrade configuration file version #312

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

Closed
kyleconroy opened this issue Jan 30, 2020 · 1 comment
Closed

Add command to upgrade configuration file version #312

kyleconroy opened this issue Jan 30, 2020 · 1 comment

Comments

@kyleconroy
Copy link
Collaborator

As we plan on shipping our second configuration version in #302, we're going to want to offer users an easy way to convert their configuration to the latest version. The Go tool offers similar functionality via go fix, so I think we should use that name.

sqlc fix will look for sqlc.json in the current directory. If it exists, it will check the version of the configuration. If the version is not the most recent, it will parse the existing file, convert it to the most recent version, and write it back to disk. If the --diff flag is specified, the new contents of the configuration file will be printed to stdout instead of being written to disk.

@kyleconroy kyleconroy modified the milestone: v1.0.0 Feb 10, 2020
@kyleconroy
Copy link
Collaborator Author

Closing this as we have continued to support both versions of the configuration file. Will revisit this if we ship a V3 of the configuration file.

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

No branches or pull requests

1 participant