10 Replies
Seems to happen where there is uniqueindex on table
is it PlanetScale?
Yes
Any updates on this?
Yeah, sorry
Could you please explain steps to reproduce? 
Does this error happen in insert/select?
Or do you see it while running migrations?
It happens on drizzle-push. If I have defaultNow() on one of the columns, it starts to complain when I am trying to add indexes or push another update
Not sure if this is somethikng on Planetscales side?
Intersseing someone having similar issue here without Drizzle
Stack Overflow
Planetscale: Creating unique index fails when a date column has a d...
I created this table in Planetscale
CREATE TABLE 
community (
    id serial PRIMARY KEY,
    name varchar(256),
    email varchar(256) NOT NULL,
    created_at timestamp(2) NOT NULL DEFAUL...This seems to solve it
GitHub
Alter table not work due to the 
created_at timestamp column · pla...Here is a my pages table: CREATE TABLE 
pages ( id bigint unsigned NOT NULL AUTO_INCREMENT, owner_id int, space_id int, type varchar(256) NOT NULL, name varchar(256) NOT NULL, slug var...So it seems like it was some sort of PlanetScale issue
Yeah, so the case is that PlanetScale have some issues with using default (now())
I would suggest using
For “default now” with PlanetScale
Try to regenerate table with this default and then it should work properly
We will add .defaultCurrentTimestamp() for PlanetScale cases