Skip to content
Back

Unknown attribute type: varchar / text

  • 0
  • 3
  • Tools
  • Databases
  • Web
  • Cloud
Dan6erbond
4 Mar, 2026, 08:47

Since the string type is deprecated I tried using varchar and text in some newer tables, but when running appwrite pull tables && appwrite types ./src/lib/appwrite/appwrite.ts I get:

TypeScript
Info: Fetching tables ...
? From which database would you like to pull collections? Skincare Buddy (skincare-buddy)
Info: Pulling all tables from Skincare Buddy database ...
Success: Successfully pulled 7 tables from 1 tableDBs.
Info: Detected language: ts
Info: Found 7 tables: products, units, routines, regiments, steps, wishlist_products, profiles
Info: Found 35 columns across all tables
Info: For detailed error pass the --verbose or --report flag
Error: ejs:24
    22| <% const propertyName = strict ? toCamelCase(attribute.key) : attribute.key; -%>
    23| <% const isValidIdentifier = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(propertyName); -%>
 >> 24|     <% if (isValidIdentifier) { %><%- propertyName %><% } else { %>"<%- propertyName %>"<% } %>: <%- getType(attribute, collections, collection.name) %>;
    25| <% } -%>
    26| }<% if (index < collections.length - 1) { %>
    27| <% } %>

Unknown attribute type: varchar
ELIFECYCLECommand failed with exit code 1.```
I have `appwrite@^21.5.0`.
TL;DR
Appwrite app showing error due to unknown attribute type like varchar or text. Update the CLI and project dependencies to the latest versions to resolve the issue. For advanced JOIN queries and DISTINCT support, check out Appwrite's GitHub Discussions and open a feature request on GitHub Issues.
4 Mar, 2026, 10:24

Hey, The appwrite command comes from appwrite-cli npm package. The varchar/text type support in the types command is available from &#x61;&#x70;&#x70;&#119;&#x72;&#x69;&#x74;&#x65;&#45;&#99;&#x6c;&#x69;&#64;&#x31;&#x33;&#46;&#x33;&#46;&#x30; Please confirm which version are you using or you can try install to latest cli

4 Mar, 2026, 12:26

You're spot on—the deprecation of the generic string type is part of the new TablesDB rollout! The error you're seeing happens because your current versions don't 'know' how to map the new SQL types (varchar, text, etc.) into TypeScript yet. You're running 21.5.0, but we recently released 23.0.0 and CLI 13.6.1 to handle exactly this. To fix this, you just need to bring everything up to date:

  1. Update your CLI:
TypeScript
npm install -g appwrite-cli
  1. Update your Project Dependencies:
TypeScript
npm install appwrite@latest

Once you're on the latest versions, run appwrite pull tables again. The type generator will now recognize varchar and text and map them correctly to TypeScript strings. Thanks for being an early adopter of the new table structures—it really helps us polish the experience!

1
4 Mar, 2026, 12:26

This will solve the issue

5 Mar, 2026, 10:31

Oh shoot! I mixed up the appwrite and appwrite-cli packages and assumed upgrading appwrite should bring me on the latest CLI version! Installing appwrite-cli into the project's dev dependencies to get v14 and regenerating the types fixed the issue. Thanks!

5 Mar, 2026, 10:33

Installing the latest CLI to my project's dev dependencies resolved this, thanks for your help! Really liking the tables so far!

On another note: It would be nice to see support for DISTINCT and generally more advanced JOIN queries e.g. to get the latest product unit in my project for example - is there a feature tracker somewhere? Because I couldn't find anything searching for issues with the type "Enhancement" and keywords "join" or "distinct". Would love to describe the use-case.

5 Mar, 2026, 10:35

Hmm, GitHub's search might not be that great after all it looks like there's issues for Query join and Select distinct haha.

5 Mar, 2026, 11:23

That’s awesome to hear! Glad the update got you back on track. TablesDB is definitely a huge step forward, and it's great to know it's working well for your project so far. Regarding DISTINCT and Advanced JOINs: You've hit on two of the most discussed topics in our roadmap right now! Because TablesDB is built to handle relational-style workloads, these features are high on our priority list. Where to track and contribute:

  • GitHub Discussions: We use GitHub Discussions for high-level RFCs (Request for Comments) and architectural feedback. This is actually the best place to describe your specific use case for JOINs (like fetching the latest product unit), as it helps our engineers design the API to fit real-world scenarios.
  • Feature Requests: If you want to open a formal issue, you can use the Feature Request template on GitHub Issues. Don't worry too much about specific labels like 'Enhancement'—our triaging team will categorise it once you submit! We'd love to hear more about your JOIN use case. The more detail you provide about your schema and the expected output, the better we can advocate for it internally! Looking forward to seeing your thoughts on GitHub!

https://github.com/appwrite/appwrite/discussions/5179 https://github.com/appwrite/appwrite/issues/10552 https://github.com/appwrite/appwrite/discussions/3545

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more