Skip to content

timestamp-column-without-suffix (NM015)#

Automatic fix is available.

What it does#

Checks that timestamp columns are suffixed with the defined suffix, by default _at.

Why not?#

Adding _at to a timestamp column name makes it clear that the value represents the time when something happened. For example, created_at indicates the time when a record was created, and updated_at indicates the time when a record was last updated.

Timestamp columns could easily be confused with other types of data if not clearly named. For example, a column named created might be unclear — does it represent a boolean flag, a date, or something else? created_at removes this ambiguity by specifying that it's a timestamp.

When should you?#

Almost Never.

Use instead:#

Add the defined suffix or the default _at to to the timestamp column name.

Configuration#

timestamp-column-suffix: Specify the suffix for timestamp columns.