Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: Initial database scaffolding#2

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 8 commits intomainfromdatabase
Jan 5, 2022
Merged

chore: Initial database scaffolding#2

kylecarbs merged 8 commits intomainfromdatabase
Jan 5, 2022

Conversation

kylecarbs
Copy link
Member

@kylecarbskylecarbs commentedJan 4, 2022
edited
Loading

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.

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.
@kylecarbskylecarbs self-assigned thisJan 4, 2022
# Check that go is available
# TODO: Implement actual test run
- run: go version
- run: go test -v ./...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice, our CI is actually doing something now 🎉

kylecarbs reacted with heart emoji
if err != nil {
return "", nil, xerrors.Errorf("create pool: %w", err)
}
resource, err := pool.RunWithOptions(&dockertest.RunOptions{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This seems fine to me for now! As we discussed, if Docker is too heavy a dependency... we could look at runningpsql manually in the future.

I think this approach makes for now, though, since the team is familiar with this approach fromcoderd. And if we decide Docker is too heavy, there might be other approaches we take (like revisiting a cloud solution...)

kylecarbs reacted with thumbs up emoji
@kylecarbskylecarbs merged commit025b55f intomainJan 5, 2022
@kylecarbskylecarbs deleted the database branchJanuary 20, 2022 16:01
bryphe-coder added a commit that referenced this pull requestFeb 2, 2022
BrunoQuaresma added a commit that referenced this pull requestMay 8, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bryphe-coderbryphe-coderbryphe-coder approved these changes

Assignees

@kylecarbskylecarbs

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@kylecarbs@bryphe-coder

[8]ページ先頭

©2009-2025 Movatter.jp