MCPcopy Index your code
hub / github.com/dnote/dnote / updateSchemaVersion

Function updateSchemaVersion

pkg/cli/migrate/legacy.go:278–292  ·  view source on GitHub ↗
(ctx context.DnoteCtx, mID int)

Source from the content-addressed store, hash-verified

276}
277
278func updateSchemaVersion(ctx context.DnoteCtx, mID int) error {
279 s, err := readSchema(ctx)
280 if err != nil {
281 return errors.Wrap(err, "Failed to read schema")
282 }
283
284 s.CurrentVersion = mID
285
286 err = writeSchema(ctx, s)
287 if err != nil {
288 return errors.Wrap(err, "Failed to write schema")
289 }
290
291 return nil
292}
293
294/***** snapshots **/
295

Callers 1

performMigrationFunction · 0.85

Calls 2

readSchemaFunction · 0.85
writeSchemaFunction · 0.85

Tested by

no test coverage detected