element-hq / element-hq/synapse
Add a test which ensures that new tables get PRIMARY KEYs.
Open
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#16648](https://github.com/matrix-org/synapse/pull/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:
-
Add a PRIMARY KEY lint
Contributor guide
Assessment
This issue has not been assessed yet.