I have an exist model (and table) with these columns: id, name, city. In this table are data and I would like to this table add the columns created_at and updated_at – could anyone give me a help, how to do it? I mean – if I create a model, so these two columns are created automatically and the time informations are inserted always automatically, when I save there something.
Is possible now to add these two columns with automatic inserting time-data?
This should allow you to add timestamp columns to an already existing model
This will create a migration file for you. Open it up and make necessary changes
Then migrate your database