Skip to content

Commit 1e9cb6c

Browse files
committed
Add remote head hash in new codebases
1 parent e376745 commit 1e9cb6c

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

codebase2/codebase-sqlite/U/Codebase/Sqlite/Queries.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4165,7 +4165,7 @@ ensureRemoteProjectBranch rpid host rbid name lastKnownCausalHash =
41654165
host,
41664166
branch_id,
41674167
name,
4168-
last_known_head)
4168+
last_known_causal_hash)
41694169
VALUES (
41704170
:rpid,
41714171
:host,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- Add a field for tracking the latest known causal hash for each remote project branch.
22
-- It's helpful for when we need to tell Share how much we know about a branch.
33

4-
ALTER TABLE remote_project
4+
ALTER TABLE remote_project_branch
55
-- Note that there isn't a guarantee this hash has actually been synced into the codebase.
66
ADD COLUMN last_known_causal_hash INTEGER NULL REFERENCES hash(id)
77
ON DELETE SET NULL;

parser-typechecker/src/Unison/Codebase/SqliteCodebase/Operations.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ createSchema = do
100100
(_, emptyCausalHashId) <- emptyCausalHash
101101
(_, ProjectBranch {projectId, branchId}) <- insertProjectAndBranch scratchProjectName scratchBranchName emptyCausalHashId
102102
Q.setCurrentProjectPath projectId branchId []
103+
Q.trackLatestRemoteHead
103104
where
104105
scratchProjectName = UnsafeProjectName "scratch"
105106
scratchBranchName = UnsafeProjectBranchName "main"

0 commit comments

Comments
 (0)