Skip to content

Add a test which ensures that new tables get PRIMARY KEYs. #16648

@matrixbot

Description

@matrixbot

This issue has been migrated from #16648.


We have a history, even recently, of not using PRIMARY KEYs and many of the cases seem tragically just because someone was unaware that it is good practice / maybe cribbed off earlier schema deltas. In many cases a UNIQUE index was created instead when that could've been a PRIMARY KEY.

This PR adds a test that flags up missing PRIMARY KEYs.

Base: develop

Original commit schedule, with full messages:

  1. Add a PRIMARY KEY lint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions