links: Phoenix MOC
How to change database fields names in phoenix app
By default when you generate a schema from cli, the timestamps uses inserted_at, let’s say you want to change this as created_at. You can do it this way
On the migration file and schema file change this
timestamps(inserted_at: :created_at)
This says use created_at in place of inserted_at