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

Make postgres tables statements generator public so it can be used externally too #2

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

kedlas
Copy link
Contributor

@kedlas kedlas commented Oct 9, 2023

By using the new public functions, the setup process should be much easier for pgq users.

@kedlas kedlas added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 9, 2023
@prochac
Copy link
Contributor

prochac commented Oct 9, 2023

Until we have Terraform provider ready, and the module isn't marked as stable release, I guess OK.

Maybe keep it in separate package with note, that it may, or may not, be removed later.

// Package foo does X, and may, or may not, be removed in a favour of Terraform provide
package foo

@prochac
Copy link
Contributor

prochac commented Oct 9, 2023

Maybe x in a path, to signalize the uncertain future of the package(s)?

Like these modules does
https://pkg.go.dev/golang.org/x
https://pkg.go.dev/gotest.tools/x

@kedlas
Copy link
Contributor Author

kedlas commented Oct 9, 2023

I vote for having it in schema package instead of x. I believe this kind of commands will always be there. Even when we create the TF provider (which will solve some of our internal tooling problem) some other users may not use terraform and use something else and we want to offer them the output of these setup functions too.

@prochac
Copy link
Contributor

prochac commented Oct 9, 2023

I vote for having it in schema package instead of x. I believe this kind of commands will always be there. Even when we create the TF provider (which will solve some of our internal tooling problem) some other users may not use terraform and use something else and we want to offer them the output of these setup functions too.

Well, it's just one SQL query :D
The Terraform will handle changes between versions, partitioning and much more.
For those who use other approach than Terraform is this not enough. From Go environment you can use go-migrate, goose etc.
This is really handy starting point, but that's it. Nothing more.

@kedlas
Copy link
Contributor Author

kedlas commented Oct 10, 2023

Agreed. I move to x/schema subdirectory.

@kedlas kedlas merged commit 0a28670 into main Oct 10, 2023
6 checks passed
@kedlas kedlas deleted the schema-generator branch October 10, 2023 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants