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

"Out of range value for column \'actor_user\' at row 1" #22

Open
janpio opened this issue Mar 1, 2020 · 1 comment
Open

"Out of range value for column \'actor_user\' at row 1" #22

janpio opened this issue Mar 1, 2020 · 1 comment

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: wikimedia
PrismaClientUnknownRequestError:
Invalid `: new actorClient()` invocation in
C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\wikimedia\node_modules\prisma-client\index.js:1110:7

  1106   args || {},
  1107   [],
  1108   errorFormat,
  1109   measurePerformance
→ 1110 ) : new actorClient

Error occurred during query execution:
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(Server(ServerError { code: 1264, message: "Out of range value for column \'actor_user\' at row 1", state: "22003" })) })
    at PrismaClientFetcher.request (C:\Users\Jan\Documents\prisma-test-utils-automation\dbs\wikimedia\node_modules\prisma-client\index.js:90:17)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
CREATE TABLE /*_*/actor (
  -- Unique ID to identify each actor
  actor_id bigint unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT,

  -- Key to user.user_id, or NULL for anonymous edits.
  actor_user int unsigned,

  -- Text username or IP address
  actor_name varchar(255) binary NOT NULL
) /*$wgDBTableOptions*/;
model actor {
  actor_id   Int    @default(autoincrement()) @id
  actor_name String @unique
  actor_user Int?   @unique
}

Error message unfortunately does not mention what exactly it tried to insert, but it obv. did not fit the column. Maybe a negative number that clashed with the unsigned?

@janpio
Copy link
Contributor Author

janpio commented Mar 1, 2020

prisma-client   'mutation {\n' +
  prisma-client     '  createOneactor(data: {\n' +
  prisma-client     '    actor_name: "ofosid"\n' +
  prisma-client     '    actor_user: -232646535\n' +
  prisma-client     '  }) {\n' +
  prisma-client     '    actor_id\n' +
  prisma-client     '    actor_name\n' +
  prisma-client     '    actor_user\n' +
  prisma-client     '  }\n' +
  prisma-client     '}'

So indeed the unsigned is the problem.

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

1 participant