Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Possible bug? - Drizzle Team
DT
Drizzle Team
•
16mo ago
•
1 reply
jeffc
Possible bug?
type UserID
= number
;
type Data
=
{
foo
: string
,
bar
: number
,
face
: boolean
,
}
;
export const usersWithBrand
= pgTable
(
'users
_with
_brand
'
,
{
id
: t
.integer
(
)
.primaryKey
(
)
.generatedByDefaultAsIdentity
(
)
.
$type
<UserID
>
(
)
,
data
: t
.jsonb
(
)
.
$type
<Data
>
(
)
,
updateCounter
: t
.integer
(
)
.default
(sql
1
1
)
.
$onUpdateFn
(
(
)
: SQL
=
> sql
${usersWithBrand.updateCounter} + 1
${usersWithBrand.updateCounter} + 1
)
,
updatedAt
: t
.timestamp
(
{ mode
:
'date
'
, precision
: 3
}
)
.
$onUpdate
(
(
)
=
> new Date
(
)
)
,
alwaysNull
: t
.text
(
)
.
$type
<string
| null
>
(
)
.
$onUpdate
(
(
)
=
> null
)
,
}
)
;
Every drizzle
-kit push will be sending out
ALTER TABLE
"users
_with
_brand
" ALTER COLUMN
"update
_counter
" SET DEFAULT 1
;
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Possible bug with nested query + reverse access
DT
Drizzle Team / help
2y ago
Possible bug in kit when using magic sql
DT
Drizzle Team / help
10mo ago
Are hierarchical rows possible?
DT
Drizzle Team / help
17mo ago
Typesafe where? argument possible?
DT
Drizzle Team / help
2y ago