Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implications table #149

Open
michielbdejong opened this issue Aug 29, 2022 · 2 comments
Open

implications table #149

michielbdejong opened this issue Aug 29, 2022 · 2 comments

Comments

@michielbdejong
Copy link
Member

From the thinking of #147 -
Create a new table implications that links movements and statements together.
Drop the type_ from movements and add unit there.
The statements table has lots of columns that came from the sync table and need cleanup

michielbdejong added a commit that referenced this issue Aug 29, 2022
# This is the 1st commit message:

Working on personal finance, implications table

# This is the commit message #2:

Unit in components table, ref #149
@michielbdejong
Copy link
Member Author

We can separate out the switch to statements/implications/movements and do it only for finance first, and for timesheets later.

It also involves a decision about how to deal with log replay functionality.

PreJournal is both a tool for flexible bookkeeping from source documents,
and a tool for running a node in a federated data network.

This means it's probably useful to have a DSL (like .pj) that can be replayed.

But the statements table is also this replayable layer.

Maybe the code should be structured such that the db contents can't be changed without going through the bottleneck of statements.

Maybe the movements table needs a tombstone column to do this properly.

@michielbdejong
Copy link
Member Author

CLI, API client, API server all produce statements and queries.

These go to the DAO statements are logged, and through implications, movements (tombstoned or not) are created / updated.

There is only one truth of movements in one PreJournal instance, but various statements can imply various movements, so that still gives a multi-faceted view of who says what, and allows for e.g. disputed transactions.

It should be possible to merge movements (just create a new merged movements, rehang the implications to it, and then tombstone the old ones)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant