fsprojects / fsprojects/FSharp.AWS.DynamoDB

Feature Request: Migration

Open
#8 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
F#
Stars
61
Forks
18
Avg merge
7h 27m
Merged PRs (30d)
1

Description

Probably the biggest want for me is a nice way to handle table 'schema' changes; 9 times out of 10 this is just some way to come up with a default value for a new non-optional field.

A minimal approach would be a TableContext hook that’s invoked when a missing (required) field is encountered, which is passed the untyped row data and should return the new value.

A more substantial migration feature would be storing schema versions in the table and running a schema upgrade function on load.

Both options would benefit from having a 'scanUpgrade' function that pre-emptively loads, upgrades & saves all the rows in the table, so you’ve got the choice between that or lazily upgrading on demand.

Would appreciate any thoughts or suggestions here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the two proposed approaches: a TableContext hook for missing required fields, or stored schema versions with upgrade functions. Define how scanUpgrade should pre-emptively load, upgrade, and save every row, and establish the expected behavior for both eager and lazy upgrades.

Written by the indexing model from the issue text.

Assessment

Tech stack
fsharp
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.