Open prvnbist opened 7 months ago
Update: I migrated to use text
datatype for my table columns but knex
adds two tables knex_migrations
and knex_migrations_lock
which contain column with data type varchar
which I've no control over, so my questions
is there a way to ignore tables while pulling locally and generating types?
Looked through the codebase for types generation, I think it might be worth updating this switch statement to handle varchar
as well
Suggested changes
case 'varchar':
case 'text':
return 'text';
Update 1:
Same thing for type uuid
and date
except for date the type Column['type']
should include date
Describe the bug
Getting a type error in
xata.ts
Short Error
Full Error
The error is in generated types on second line at
SchemaTables
Here
tables
is typed as following where one of the columns have a typevarchar(255)
To Reproduce Having one of the column type as
varchar(255)
should help reproduce it.Expected behavior
Software version
"@xata.io/client": "^0.29.3"
Additional context I'm using
knex
for building schema and migration, this would be resolved if I switch to.text
instead of.string
which sets the column type to bevarchar
since that's what typescript understands.