zz_

app/worker/migrations/0007_repo_shard_origin.sql

zzmq.dev@gmail.com/zz / app / worker / migrations / 0007_repo_shard_origin.sql @ 08379230 Download
Ladder Summary
  • file The migration adds a nullable `shard_of_slug` TEXT column to the **repos** table, which serves as a foreign‑key pointer to the slug of the repository that the current repo was forked from (i.e., its immediate parent shard). It also creates an index **idx_repos_shard_of** on that column to speed up look‑ups. No functions or classes are exported from this file.
 -- A shard repo is a scoped workspace for one task, created by forking
 -- (ArtifactsRepo.fork) its parent repo -- which may itself already be
 -- a shard, forming a chain back to the true origin. This column is
 -- the immediate-parent pointer (mirroring Lane.origin's "parent, not
 -- root" semantics at the repo level): nullable since most repos are
 -- not shards at all.
 ALTER TABLE repos ADD COLUMN shard_of_slug TEXT NULL REFERENCES repos(slug);
 CREATE INDEX idx_repos_shard_of ON repos(shard_of_slug);