system-table-change

Installation
SKILL.md

System Table Schema Change Checklist

When adding, removing, or modifying columns or indexes on a system table, multiple files and golden test artifacts must be updated in lockstep. Missing any of these causes test failures that can be confusing to debug.

1. Schema Definition

Update the table's schema string and descriptor literal in:

  • pkg/sql/catalog/systemschema/system.go
    • The CREATE TABLE schema string (e.g., StatementDiagnosticsRequestsTableSchema)
    • The descriptor literal (e.g., StatementDiagnosticsRequestsTable): columns, column IDs, family column names/IDs, index store column names/IDs, NextColumnID
    • NextColumnID must be max(column IDs) + 1
    • When adding/removing columns, update both ColumnNames and ColumnIDs in the family descriptor
    • If the column should be stored in a secondary index, update both the schema string's STORING clause and the descriptor literal's StoreColumnNames/StoreColumnIDs

2. New Table Registration (skip if modifying existing table)

If creating a brand new system table, register it in these additional files:

Related skills
Installs
3
GitHub Stars
32.1K
First Seen
Mar 28, 2026