Skip to content
Discussion options

You must be logged in to vote

I see, so the test factory generates data based on column types: random number for int, random text for varchar, but it doesn't know how to generate data for your t.id because it is a custom type.

You can add .as(t.string()), to the definition of the shared id column, and test factory would generate a random string.

Another option: you can configure test factory for this specific table to generate data for id as needed, here is a doc.

This isn't ideal because it's per table, it would be better to define how to generate id just once for all tables, not implemented yet.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@thomask5
Comment options

@romeerez
Comment options

Answer selected by thomask5
@thomask5
Comment options

@romeerez
Comment options

@thomask5
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants