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

db normalization: consolidate CHECKINGACCOUNT and BILLSDEPOSITS, eliminate BUDGETSPLITTRANSACTIONS #38

Open
slodki opened this issue Dec 1, 2018 · 0 comments

Comments

@slodki
Copy link
Contributor

slodki commented Dec 1, 2018

All transaction's details from BILLSDEPOSITS can be stored in CHECKINGACCOUNT with TRANSDATE set to NULL. Then BUDGETSPLITTRANSACTIONS can be migrated to SPLITTRANSACTIONS.

  • All existing queries to CHECKINGACCOUNT should verify TRANSDATE is not null
  • All existing queries to BILLSDEPOSITS should read details from linked CHECKINGACCOUNT and SPLITTRANSACTIONS
  • There is no data lose as TRANSDATE is always equal to NEXTOCCURRENCEDATE in BILLSDEPOSITS

Schema changes (BILLSDEPOSITS simplified, BUDGETSPLITTRANSACTIONS removed):
tables

I don't know if data migration could be implemented in pure SQL...

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