Skip to main content
Version: v2.x

Postgres: Adding created_at / updated_at Timestamps

Introduction

We often need created_at and updated_at timestamp fields in our tables in order to indicate when an object was created or last updated. This page explains how to add these.

Add a created_at timestamp

On the Hasura Console, click on the Modify tab of a table. When clicking on the +Frequently used columns button, choose created_at:

Add a created_at time on the Hasura Console

Click the Add column button.

Add an updated_at timestamp

On the Hasura Console, click on the Modify tab of a table. When clicking on the +Frequently used columns button, choose updated_at:

Add an updated_at time on the Hasura Console

Click the Add column button.