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

Simple book-keeping database schema #2

Open
achakravarti opened this issue Apr 7, 2021 · 0 comments
Open

Simple book-keeping database schema #2

achakravarti opened this issue Apr 7, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@achakravarti
Copy link
Owner

achakravarti commented Apr 7, 2021

Tables

gaap

Field Properties
id serial pk
tag varchar (8) unique

category

Field Properties
id serial pk
tag varchar (64)
gaap serial fk -> gaap
debit char (1)
credit char (1)

chart

Field Properties
id bigserial pk
tag varchar (256)
category serial fk -> category

journal

Field Properties
timestamp datetime pk
transaction varchar (1024)
amount real
debit bigserial -> chart
credit bigserial -> chart
posted bool default false

ledger

Field Properties
id uuid pk
account bigserial -> chart
transaction uuid fk -> journal
balance real

memo

Field Properties
id serial pk
transaction uuid fk -> journal
memo blob

References

@achakravarti achakravarti added the enhancement New feature or request label Apr 7, 2021
@achakravarti achakravarti self-assigned this Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant