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

Doesn't work with Postgres because a table is named "user" #3

Open
alexsegura opened this issue Jun 8, 2022 · 2 comments
Open

Doesn't work with Postgres because a table is named "user" #3

alexsegura opened this issue Jun 8, 2022 · 2 comments

Comments

@alexsegura
Copy link
Contributor

I'm having the following error when trying to login:

Capture d’écran 2022-06-08 à 18 32 07

It's because "user" is a reserved keyword, and should be quoted when executing the query, or it returns the currently connected user.

dabba=# select * from user;
   user
----------
 postgres
(1 row)
dabba=# select * from "user";
 id | owned_zone_id | zone_id | email | password | firstname | lastname | dob | is_verified | roles | wallet | fidelity | created_at
----+---------------+---------+-------+----------+-----------+----------+-----+-------------+-------+--------+----------+------------
(0 rows)

Which database engine are you actually using in production? MariaDB?

@janssens
Copy link
Owner

janssens commented Jun 9, 2022

oui on utilise MariaDB. Je vais regarder pour changer le nom de la table.

@alexsegura
Copy link
Contributor Author

Ce n'est pas prioritaire, je vais utiliser MariaDB dans Docker.
J'ai été induit en erreur parce que le fichier .env semble utiliser Postgres.

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