Skip to content

Commit e1c60d1

Browse files
docs(db): note deferred Repo date backfill migration
Record that existing-record backfill stays out of startup and belongs in a follow-up versioned migration using Mongo $toDate on _id. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 22b634a commit e1c60d1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

src/db/types.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,18 @@ export class Repo {
5858
name: string;
5959
url: string;
6060
users: { canPush: string[]; canAuthorise: string[] };
61-
/** ISO-8601; set on create, never overwritten thereafter */
61+
/**
62+
* ISO-8601; set on create, never overwritten thereafter.
63+
* Existing repos missing this field are intentionally left unset here —
64+
* backfill belongs in a follow-up versioned migration (Mongo: prefer
65+
* `$toDate: "$_id"` over an epoch default). Do not reintroduce startup
66+
* one-off backfills.
67+
*/
6268
dateCreated?: string;
63-
/** ISO-8601; set on create and bumped on repo metadata mutations */
69+
/**
70+
* ISO-8601; set on create and bumped on repo metadata mutations.
71+
* Same migration note as {@link Repo.dateCreated}.
72+
*/
6473
lastModified?: string;
6574
_id?: string;
6675

0 commit comments

Comments
 (0)