Is there a simple way to make a column have a defa...
# help
l
Is there a simple way to make a column have a default value of now() + 3 days?
n
Hello ! This thread has been automatically created from your message in a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
/title
command! We have solved your problem? Click the button below to archive it.
n
lasershow365 (2022-03-18)
l
I tried this and i'm getting this error
d
Try changing the type to timestamp
g
I'd guess table UI is not handling it. You may need to use the SQL window to alter the table and add the column.
l
Could you help me with the SQL to change the default value for a column? Is it something like this:
ALTER TABLE trials ALTER COLUMN trial_expires_at SET DEFAULT now() + '3 days'::interval;
Ah actually this worked 👆
Thanks for the help!