Conversation
This implements migrations and code generation for interfacing with a PostgreSQL database. A dependency is added for the "postgres" binary on the host, but that seems like an acceptable requirement considering it's our primary database. An in-memory database object can be created for simple cross-OS and fast testing.
bryphe-coder
reviewed
Jan 4, 2022
.github/workflows/coder.yaml
Outdated
| # Check that go is available | ||
| # TODO: Implement actual test run | ||
| - run: go version | ||
| - run: go test -v ./... |
Contributor
There was a problem hiding this comment.
Nice, our CI is actually doing something now 🎉
bryphe-coder
reviewed
Jan 4, 2022
| if err != nil { | ||
| return "", nil, xerrors.Errorf("create pool: %w", err) | ||
| } | ||
| resource, err := pool.RunWithOptions(&dockertest.RunOptions{ |
Contributor
There was a problem hiding this comment.
This seems fine to me for now! As we discussed, if Docker is too heavy a dependency... we could look at running psql manually in the future.
I think this approach makes for now, though, since the team is familiar with this approach from coderd. And if we decide Docker is too heavy, there might be other approaches we take (like revisiting a cloud solution...)
bryphe-coder
approved these changes
Jan 4, 2022
bryphe-coder
added a commit
that referenced
this pull request
Feb 2, 2022
BrunoQuaresma
added a commit
that referenced
this pull request
May 8, 2025
1 task
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements migrations and code generation for interfacing with a PostgreSQL database.
A dependency is added for the "postgres" binary on the host, but that seems like an acceptable requirement considering it's our primary database.We decided Docker was a more reliable and ubiquitous dependency, so we launch a PostgreSQL Docker container instead.An in-memory database object can be created for simple cross-OS and fast testing.