1 2 3
ALTER TABLE users DROP COLUMN lastmessage; ALTER TABLE users ADD COLUMN lastmessage timestamp with time zone; UPDATE users SET lastmessage=last_seen;