From 66ca622a929f7bd87544659a028eab313ea87cbb Mon Sep 17 00:00:00 2001 From: Mohammad Reza Ostadi Date: Mon, 3 Jan 2022 12:10:23 +0330 Subject: [PATCH 1/3] Update README.md prisma not saving user if metadata is null --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f052e29..b48735c 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Make sure you have `docker` & `docker-compose` installed on the server / system. 7. Click on the `User` model to add a new user record. -8. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user. +8. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/) and filling metadata with empty json instead of null) and click `Save 1 Record` to create your first user. 9. Open a browser to [http://localhost:3000](http://localhost:3000) and login with your just created, first user. From 178dfc90ec4a4e7718abc50bc6dec6682cfa967f Mon Sep 17 00:00:00 2001 From: Mohammad Reza Ostadi Date: Thu, 13 Jan 2022 19:45:22 +0330 Subject: [PATCH 2/3] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b48735c..5940e87 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ Make sure you have `docker` & `docker-compose` installed on the server / system. 7. Click on the `User` model to add a new user record. -8. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/) and filling metadata with empty json instead of null) and click `Save 1 Record` to create your first user. +8. Fill out the fields (remembering to encrypt your password with [BCrypt](https://bcrypt-generator.com/)) and click `Save 1 Record` to create your first user. 9. Open a browser to [http://localhost:3000](http://localhost:3000) and login with your just created, first user. @@ -85,3 +85,4 @@ For more advanced usage, please refer to the git documentation: [https://git-scm ## Troubleshooting * SSL edge termination: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service. +* If you had and issue creating user please check if the metadata field is null change it to empty json ({}) and you will be fine. From 9789112fda868654289c8eb71d29d0e625851bf0 Mon Sep 17 00:00:00 2001 From: Colin Griffin Date: Fri, 14 Jan 2022 16:13:19 -0500 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5940e87..8a5e42c 100644 --- a/README.md +++ b/README.md @@ -85,4 +85,4 @@ For more advanced usage, please refer to the git documentation: [https://git-scm ## Troubleshooting * SSL edge termination: If running behind a load balancer which handles SSL certificates, you will need to add the environmental variable `NODE_TLS_REJECT_UNAUTHORIZED=0` to prevent requests from being rejected. Only do this if you know what you are doing and trust the services/load-balancers directing traffic to your service. -* If you had and issue creating user please check if the metadata field is null change it to empty json ({}) and you will be fine. +* Failed to commit changes: Invalid 'prisma.user.create()': Certain versions may have trouble creating a user if the field `metadata` is empty. Using an empty json object `{}` as the field value should resolve this issue. Also, the `id` field will autoincrement, so you may also try leaving the value of `id` as empty.