supertokens / docs

SuperTokens documentation
39 stars 70 forks source link

BIGINT UNSIGNED type in PostgreSQL initialization SQL causes error #640

Closed mrexmelle closed 1 year ago

mrexmelle commented 1 year ago

Background

The initialization guide in https://supertokens.com/docs/thirdpartyemailpassword/custom-ui/init/database-setup/postgresql mandates the creation of passwordless_users table with a BIGINT UNSIGNED type.

As PostgreSQL doesn't support UNSIGNED types (PTAL: https://www.postgresql.org/message-id/CAEcSYX+Arn7y4FeYPp6ZgbiiiMfZYmsn9aUyotZB-MA1n5hTOw@mail.gmail.com), it is expected that an error occurs during creating a docker image with this type included within the initialization SQL script.

Screenshots

Screenshot 2023-04-14 at 22 34 14
rishabhpoddar commented 1 year ago

hey @mrexmelle thanks for raising this issue. It seems to be a mistake in our docs. The actual schema can be seen here: https://github.com/supertokens/supertokens-postgresql-plugin/blob/master/src/main/java/io/supertokens/storage/postgresql/queries/PasswordlessQueries.java#L49.

It should just be time_joined BIGINT NOT NULL,.

mrexmelle commented 1 year ago

Hi @rishabhpoddar , I created a PR here: https://github.com/supertokens/docs/pull/641

Do you think it would help?

rishabhpoddar commented 1 year ago

Thanks @mrexmelle