← all rules

require-comment

warning

Missing COMMENT

Why it's unsafe

A new table or column has no COMMENT.

Safe rewrite

Add a COMMENT ON TABLE / COMMENT ON COLUMN in the migration documenting the new object.

Example

Try it in the playground →

Unsafe

CREATE TABLE users (id bigint PRIMARY KEY);

Safe

CREATE TABLE users (id bigint PRIMARY KEY);
COMMENT ON TABLE users IS 'Application user accounts.';