feat(npm): npm remote repositories schema (S15 Step 1a)

📦 Stacked MRs

This change splits S15 Step 1 (the npm-remote core schema) into 3 stacked merge requests, one migration per MR, so each table lands and is reviewed on its own. Each part targets the previous one (part 1 targets main). Please review and merge them in order, bottom-up — merging part 1 auto-retargets the rest.

Stack (review/merge bottom-up)

📌 This part

Part 1 of 3 of npm remote — Step 1: the npm_remote_repositories table.

Creates the remote-repository config table per the S15 Data Model:

  • HASH(namespace_id) partitioned into 64 partitions, PK (id, namespace_id), following the hosted-npm/OCI conventions.
  • FK to repositories(id, namespace_id) ON DELETE CASCADE, and UNIQUE (namespace_id, repository_id) (1:1 with its parent repository).
  • The S13 remote-behavior columns: upstream url, interim tmp_plaintext_auth_token, cache_validity_hours / metadata_cache_validity_hours, and the health-status columns.

Includes schema-invariant integration tests (partitions, PK, columns, CHECKs, FK reject/cascade, unique). The diff bulk is mechanical 64-partition DDL; structure.sql and jet types are generated.

npm_remote_packages (part 2) and npm_remote_versions (part 3) stack on this via their FK chain.

  • Plan: docs/plans/2026-07-15-npm-remote.md — Step 1
  • Spec: docs/specs/S15-npm-remote.md — Data Model

Related to #338 (closed)

Edited by Dzmitry (Dima) Meshcharakou

Merge request reports

Loading
Loading