How to create a column with varchar of 30 using Knex js?

I am using Knex js with my node application and I need to have some columns with varchar 330 and 50, but I couldn't find any resource explaing how to achieve that using Knex.

I need something like
table.string("userName").notNullable().varchar(30);



Read more here: https://stackoverflow.com/questions/65701854/how-to-create-a-column-with-varchar-of-30-using-knex-js

Content Attribution

This content was originally published by Marlon Englemam at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: