drizzle-team / drizzle-team/drizzle-orm
[BUG]: Generate columns : The doc info is invalid
- Dominant language
- TypeScript
- Stars
- 35.8k
- Forks
- 1.6k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 4
Description
### Report hasn't been filed before.
- [X] I have verified that the bug I'm about to report hasn't been filed before.
### What version of `drizzle-orm` are you using?
0.37.0
### What version of `drizzle-kit` are you using?
0.29.1
### Other packages
_No response_
### Describe the Bug
I spent the past 3 hours trying to figure out an error I kept on running into with generate columns.
These are the docs I referenced: https://orm.drizzle.team/docs/generated-columns
Every example shown in the doc will throw an error
```ts
export const test = pgTable("test", {
generatedName: text("gen_name").generatedAlwaysAs(sql`hello "world"!`),
});
// Error: error: syntax error at or near "world"
```
```ts
export const test = pgTable("test", {
generatedName: text("gen_name").generatedAlwaysAs(sql`hello "world"!`),
});
// Error: error: syntax error at or near "world"
```
Is this article deprecated? Or what is the correct to assign text to generated columns?
Contributor guide
Assessment
This issue has not been assessed yet.