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

Database migration upon setup #2

Open
olivierobert opened this issue Jan 21, 2022 · 2 comments
Open

Database migration upon setup #2

olivierobert opened this issue Jan 21, 2022 · 2 comments

Comments

@olivierobert
Copy link

Upon cloning the repository, I followed the setup instructions and successfully started the application 🎉

Screen Shot 2565-01-21 at 16 40 28

Note that I manually created a PostgreSQL database as it seems that there is not handled by the application since I need to reference the database and its credentials in the .env file. This step should probably be added to the README file.

However, the tables have not been created/migrated despite migration.Migrate() being called in main.go:

image

On a side note, do you have experience using Docker for local development as this would avoid having to run a local PostgreSQL server?

@rashikzaman
Copy link
Owner

I should have mentioned in the README.md that the application doesn't create the database itself. I'll add that.

I don't understand the issue behind no tables being migrated. I've tested the code on two separate systems and both tables were migrated. I'll definitely look into the issue. Thanks for discovering this bug!.

I've experience using docker for local development. I initially wanted to create docker file for golang, postgres and next.js but couldn't find the time. But I'll add them by tomorrow, 22 January,

@rashikzaman
Copy link
Owner

Golang and Postgres container are created and details are in this pull request. Codes are in the master branch. Please review the docker installation section in the README.md. Tables should be migrated now.

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

2 participants