Q121: a file id keeps the bytes it was recorded with; rewrites get new ids
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
04c8cce0c4
commit
8f192eabe7
11 files changed
+143
-19
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export const fileVersionsSchema = `
|
||||
alter table file_objects add column source_path text;
|
||||
alter table file_objects add column superseded_at text;
|
||||
update file_objects set source_path = storage_path where source_path is null;
|
||||
create index if not exists file_objects_source on file_objects(org_id, source_path, sha256);
|
||||
|
||||
insert into schema_migrations(version, name, applied_at)
|
||||
values (89, 'file_versions', datetime('now'));
|
||||
`;
|
||||
@@ -87,6 +87,7 @@ import { approvalSubjectSnapshotSchema } from "./migrations/085-approval-subject
|
||||
import { heldDeliverablesSchema } from "./migrations/086-held-deliverables";
|
||||
import { goalAuditorSchema } from "./migrations/087-goal-auditor";
|
||||
import { hostAccessNoteSchema } from "./migrations/088-host-access-note";
|
||||
import { fileVersionsSchema } from "./migrations/089-file-versions";
|
||||
|
||||
interface Migration {
|
||||
version: number;
|
||||
@@ -183,6 +184,7 @@ const MIGRATIONS: Migration[] = [
|
||||
{ version: 86, name: "held_deliverables", sql: heldDeliverablesSchema },
|
||||
{ version: 87, name: "goal_auditor", sql: goalAuditorSchema },
|
||||
{ version: 88, name: "host_access_note", sql: hostAccessNoteSchema },
|
||||
{ version: 89, name: "file_versions", sql: fileVersionsSchema },
|
||||
];
|
||||
|
||||
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;
|
||||
|
||||
Reference in new issue
Block a user