Using VARCHAR in a sqlite table

I am trying to use the varchar type in my sqlite table schema but cannot find an import anywhere for it. Is varchar supported for sqlite yet?!
3 Replies
!! S҉҉t̷̀̀a҉̷rs҉ţ̷̧a͜l̷̨͟k̢̡͡e̴r
(also please ping me in replies 👍) Is
text("field_name", { length: 36 })
text("field_name", { length: 36 })
equivalent?
Mykhailo
Mykhailo9mo ago
@!! S҉҉t̷̀̀a҉̷rs҉ţ̷̧a͜l̷̨͟k̢̡͡e̴r hello! there is not varchar type in SQLite, using it (or specifying length with types like text(36)) is interpreted as text. However, SQLite does not enforce the length constraint, allowing strings of any length up to its maximum limit. Thus, specifying length in SQLite is more about compatibility with other database systems and does not impact data storage limits within SQLite itself. that's why there is no varchar in drizzle imports for sqlite. You can just use text
!! S҉҉t̷̀̀a҉̷rs҉ţ̷̧a͜l̷̨͟k̢̡͡e̴r
Alright so it's on me to not be a fuck-up if I want to eventually move to something else 😂 Good to know, thanks!
Want results from more Discord servers?
Add your server