"now" as default value for timestamp not working
When adding a new timestamp column in the xata web ui (using xata with postgres enabled), if you set the default value to be now, it sets the default value to the time at which you created the column instead of being the time when a new row is created.
1 Reply
thanks, I can replicate this and seems to be a pgroll issue. I'm speaking with the team to figure out what's going on and will report back.
it seems there is an UI issue where we create the column using
now
instead of now()
. I think we'll have the fix soon, but if you need a workaround in the meantime, you can create the column by using the Schema / Migration editor and then use something like this:
That's what the UI does, except that it uses now
instead of now()
.
this should be fixed in the meantime