*Add Primary Keys,
They don't need a relation to them to be one!
*Will need to revise PKs and FKs
How to do double-entry
for inventory???
Double Entry Accounting
Add external_id to all tables.
Replace UUID for customer_id with bigserial
This is known as the "Hybrid Approach"
*Reminders need to use TIMESTAMP
They are in "local time". No sense utilizing TIMESTAMPZ.
*Scheduling stuff would be in TIMESTAMP as well
They are in "local time". No sense utilizing TIMESTAMPZ.
**Pricelist Sending TIMESTAMPZ
They traverse multiple times.
**Sending emails in the web app use TIMESTAMP
Local time is what is needed
Pricelist Portion
Add: ^^^^^
user_id for any table; and for any table that has "last_modified" & "created_at" in it. This is used to track changes made by users and any potential for users to "self sabotage a company" and who maybe did an order.
*We will be going with 3 databases
Primary & Replica
We will route writes to PRIMARY and Reads to REPLICA.
This will further make it super fast!
REPLICA Copy so in case we have a failure of Primary, we move Replica1 to Primary and Replica2 to Replica and then Primary to Replica2 position.
Redundancy
Then backups to like RackSpace in case of an accidental erase!
Explore more options for JSONB
in this table & apply to others.
NEED TO ASK CHATGPT ON THESE TABLES FOR REFERENCING AND BIGSERIAL AND BIGINT!?
-->
-->
-->
-->
-->
-->
USER SERIAL OR BIGSERIAL ON THE OG TABLE AND THEN USE BIGINT ON THE TABLES WHERE IT IS REFERENCED.
any serial field auto-increments and this is an issue when it gets referenced in another table...
-->
-->
-->
-->
-->
Not following through on a comment system for blog posts. Don't want to give away customers.
What about chart of accounts for warehouses??
*Ask about whether to have NN for "created_by_user" columns?
Currencies referenced from another table.
Need more help! ChatGPT has it, but I don't get it!!