Už jste skoro tam, použijte FROM_UNIXTIME()
místo přímého kopírování hodnoty.
-- creating new column of TIMESTAMP type
ALTER TABLE `pm`
ADD COLUMN `date_sent2` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP();
-- Use FROM_UNIXTIME() to convert from the INT timestamp to a proper datetime type
-- assigning value from old INT column to it, in hope that it will be recognized as timestamp
UPDATE `pm` SET `date_sent2` = FROM_UNIXTIME(`date_sent`);
-- dropping the old INT column
ALTER TABLE `pm` DROP COLUMN `date_sent`;
-- changing the name of the column
ALTER TABLE `pm` CHANGE `date_sent2` `date_sent` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP();