-
Notifications
You must be signed in to change notification settings - Fork 276
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
Postgres Support #176
Comments
It's good if gotrue could support gorm like gocommerce . I like postgresql too. |
The underlying orm (from gobuffalo) actually supports postgres and I actually got it working by converting the initial MySQL setup to postgres format |
@mraerino Can you share your codes with me ? |
@goodforever here is the postgres setup based on the current migrations: https://gist.github.com/mraerino/d6932e2c01c79fa453d705f5ae93e641 This is being used in a docker setup with a db user called Please note: Any further migrations will not be covered and could lead to problems. |
@mraerino I don't start gotrue now ,so I have no data dump problem , I hope to modify gotrue to support postgresql ,then use it. Do you have modified gotrue codes for pg support ? |
So, I remember there was a reason to rip out gorm, but for the life of me I can't remember what it was. We would happily consider a PR to add gorm -- or other ORM -- but I don't think at netlify will be adding it anytime soon. I def won't stop the community though :) |
I see #47 ,It can support postgres, but there are no these code from git clone . |
@goodforever there are no code changes needed to support postgres. it is already possible. Try this configuration:
The dump I linked to before has to be applied once to the database before launching gotrue. |
@mraerino What driver package is it for this config ? I use github.com/jinzhu/gorm/dialects/postgres ,When ./gotrue migrate, I can migrate only one table "schema_migration" . |
@goodforever my advice was to not apply any migrations but instead build the database using my dump. |
@goodforever and since this project does not use gorm, you will not have any luck using any gorm tooling. |
@mraerino I just want to support postgres , I read doc of github.com/gobuffalo/pop ,it can support postgres ,but how can I let it work ? if I don't migrate mysql sql ,is it correct in following config ? in dial.go file import (
) in .env file GOTRUE_DB_DRIVER=postgres |
Pop supports database suffixes in patch name: https://gobuffalo.io/en/docs/db/migrations#targeting-a-database Supporting Postgres means renaming the existing migration files to add the suffix for MySQL, then create a Postgresql version of these patches. |
@mraerino your dump works for me thanks. I am able to connect postgres db via postgres db url given above. only change I did is, I replaced schema to public and owner to postgres as default. However automigrate isn't working. I was able to automigrate in netlify's another repo of goecommerce. |
@anuj509 See: #176 (comment) |
This issue has been automatically marked as stale because it has not had activity in 1 year. It will be closed in 7 days if no further activity occurs. Thanks! |
This issue was closed because it had no activity for over 1 year. |
- Do you want to request a feature or report a bug?
Feature request
- What is the current behavior?
The docs state only
mysql
to be supported- What is the expected behavior?
I'd really like to have postgres support.
What are the steps to get there?
pop
should support postgres right?The text was updated successfully, but these errors were encountered: