prisma-test-utils
prisma-test-utils copied to clipboard
"Unsupported jsonb version number 111"
This is most likely an issue with test-utils
producing incorrect data for jsonb
type. Note that fixing this would still not work yet (https://github.com/prisma/prisma-client-js/issues/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:
- https://github.com/prisma/introspection-engine-output/blob/test_utils/test-utils/results/postgresql_public_test_utils_aragon-notification-service_stderr.log
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
);
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.