Skip to content
This repository has been archived by the owner on Apr 23, 2024. It is now read-only.

"Incorrect datetime value: \'2081-07-13 01:02:18\' for column \'last_update\' at row 1" #20

Open
janpio opened this issue Mar 1, 2020 · 3 comments

Comments

@janpio
Copy link
Contributor

janpio commented Mar 1, 2020

When using prisma-test-utils via prisma-test-utils-automation, some databases (schemas from: https://github.com/prisma/database-schema-examples) fail with this error message:

Error in: sakila
PrismaClientUnknownRequestError:
Invalid `: new actorClient()` invocation in
C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\sakila\node_modules\prisma-client\index.js:648:7

   644   args || {},
   645   [],
   646   errorFormat,
   647   measurePerformance
→  648 ) : new actorClient

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Server(ServerError { code: 1292, message: "Incorrect datetime value: \'2081-07-13 01:02:18\' for column \'last_update\' at row 1", state: "22007" })) })
    at PrismaClientFetcher.request (C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\sakila\node_modules\prisma-client\index.js:90:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

SQL behind this field:

CREATE TABLE actor (
    actor_id integer DEFAULT nextval('actor_actor_id_seq'::regclass) NOT NULL,
    first_name character varying(45) NOT NULL,
    last_name character varying(45) NOT NULL,
    last_update timestamp without time zone DEFAULT now() NOT NULL
);

Looks like an Introspection/Client problem.

@janpio janpio changed the title ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Server(ServerError { code: 1292, message: "Incorrect datetime value: \'2081-07-13 01:02:18\' for column \'last_update\' at row 1", state: "22007" })) }) "Incorrect datetime value: \'2081-07-13 01:02:18\' for column \'last_update\' at row 1" Mar 1, 2020
@maticzav
Copy link
Contributor

We are now leveraging prisma-client-js to do date manipulation. Input value is of type (node) Date.

@janpio
Copy link
Contributor Author

janpio commented Mar 10, 2020

Meaning what exactly in context of this issue?

@maticzav
Copy link
Contributor

not sure 😅

you can ignore it. I thought this was addressing test-utils

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants