weirdness with sql`CURRENT
Here's my simple schema
However when I look at what's in studio all I see is the rows all defaulting to the text be actually "sql
CURRENT_TIMESTAMP
" in the created_at field? What did I miss? Sorry complete newbie here.4 Replies
Hey @andystevenson! It's a bug, will be fixed. Btw, you should do like this:
This is to ensure that CURRENT_TIMESTAMP is a constraint and not a string
Hi @Mykhailo , thanks for responding so quick. I think I actually tried that... same result... let me try again!
It won't fix your issue because there is a problem in drizzle studio. But team knows this bug, so it will be fixed:)
(CURRENT_TIMESTAMP)
instead of CURRENT_TIMESTAMP
just prevents issues that could be raised by push
command because Drizzle Kit can misidentify if it is a string or constraint, so parentheses are importantThanks