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

"Unsupported jsonb version number 111" #34

Open
divyenduz opened this issue Mar 9, 2020 · 1 comment
Open

"Unsupported jsonb version number 111" #34

divyenduz opened this issue Mar 9, 2020 · 1 comment

Comments

@divyenduz
Copy link

divyenduz commented Mar 9, 2020

This is most likely an issue with test-utils producing incorrect data for jsonb type. Note that fixing this would still not work yet (prisma/prisma-client-js#60). The error it should yield should be similar to WrongType (jsonb).

We might need a specific faker for jsonb type. However, I think that information is lost in dmmf, so let us see how we can make that possible.


Internal notes:

Test utils database(s) affected:

model eventsources {
  abi              String?
  app_name         String
  contract_address String
  created_at       DateTime?
  enabled          Boolean         @default(true)
  ens_name         String?
  event_name       String
  eventsource_id   Int             @default(autoincrement()) @id
  from_block       Int
  kernel_address   String
  last_poll        DateTime?
  network          String
  subscriptions    subscriptions[]

  @@unique([contract_address, network, event_name], name: "eventsources_contract_address_event_name_network_unique")
}
CREATE TABLE public.eventsources (
    eventsource_id integer NOT NULL,
    created_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP,
    enabled boolean DEFAULT true NOT NULL,
    contract_address character varying(255) NOT NULL,
    kernel_address character varying(255) NOT NULL,
    ens_name character varying(255),
    abi jsonb,
    event_name character varying(255) NOT NULL,
    app_name character varying(255) NOT NULL,
    network character varying(255) NOT NULL,
    from_block bigint NOT NULL,
    last_poll timestamp with time zone
);
@janpio janpio changed the title Unsupported jsonb version number 111 "Unsupported jsonb version number 111" Mar 9, 2020
@janpio
Copy link
Contributor

janpio commented Mar 11, 2020

I added model and SQL information that shows that the jsonb column is currently introspected as String?, thus test-utils currently can not know what type of data to generate.

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