Du skal tilføje kolonnen med standardværdien null , ændr derefter kolonnen til at have standard now() .
ALTER TABLE mytable ADD COLUMN created_at TIMESTAMP;
ALTER TABLE mytable ALTER COLUMN created_at SET DEFAULT now();
Du skal tilføje kolonnen med standardværdien null , ændr derefter kolonnen til at have standard now() .
ALTER TABLE mytable ADD COLUMN created_at TIMESTAMP;
ALTER TABLE mytable ALTER COLUMN created_at SET DEFAULT now();