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

Breaking changes with release 2.5.0 #529

Closed
fentas opened this issue May 25, 2021 · 3 comments
Closed

Breaking changes with release 2.5.0 #529

fentas opened this issue May 25, 2021 · 3 comments

Comments

@fentas
Copy link

fentas commented May 25, 2021

Hey 👋
took me a little bit to figure this out.
I had / have a problem with release 2.5.0 especially through #507

First, docu (and references like docker-compose) does not reflect that you now required to set env DATABASE_URL.
HBP just fails with

yarn run v1.22.5
$ node -r ./dist/start.js
Applying migrations
(node:27) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5432
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:27) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:27) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Also, if stated fresh it enforces the public.user table as it will migrate before hasura migrations.

Side question:
Is it required that user id is uuid or does it also work with integer ?

Thanks

@elitan
Copy link
Contributor

elitan commented May 26, 2021

We've added information about DATABASE_URL in the release note:

https://github.com/nhost/hasura-backend-plus/releases/tag/v2.5.0

We also have a PR that will show the error more clearly:
#525

Also, if stated fresh it enforces the public.user table as it will migrate before hasura migrations.

Yes, is that a problem for you?

Side question:
Is it required that user id is uuid or does it also work with integer?

I think uuid only. Generally, don't change any schema that was auto-applied by HBP.

@fentas
Copy link
Author

fentas commented May 26, 2021

We've added information about DATABASE_URL in the release note:

Ah. Overlooked this. But as it was my first try with hbp I looked into documentation and used the docker-compose from master which will fail atm as latest is 2.5.0 and DATABASE_URL is missing. Had to look into source to find the problem.

#525

👍 top

Yes, is that a problem for you?

I had already a user table within my hasura migrations which wasn't created anymore and failed the migration process itself.
One problem was also that the current schema had Integer as pid so after using the user table with uuid all other (current relations) did not work.

I reworked them now as it was not a big schema for now. : ) But for an existing (bigger) project this could be problematic.

@elitan
Copy link
Contributor

elitan commented May 27, 2021

It would be nice to allow int for public.users.id but I don't think that's possible because we have an FK from auth.accounts.user_id to connect the two tables.

Thanks for your feedback. I'll close this issue for 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