Command line to fill up model

Hi, i have an issue with my db:
i use PostgreSQL and i have an “accommodation” model that contains a “date of publication”.
But my old accommodations don’t have any “date of publication”.
So i’d like to use the terminal to tell my model "for those who don’t have a date of publication yet take the “last modification date”.

Any clue?