Take the 2-minute tour ×  Two projects (A & B) under design at
the same time both needs a new table(called DocumentStore) to
store document/file under postgres.  But business logic around
the document storage are different between project A & B, this
means relationship around DocumentStore are different between A
& B.  Let's make this a bit more concrete, see example below:
The Document storage table structure looks the same without
constraints/ foreign Keys:  Table DocumentStore  DocUUID
//unique Id for this document, PK, FK to other table depends on
project  fileName //file name fileType //file type FileContent
//store file as blog  In project A, DocumentStore.DocUUID
references Email.EmailUUID:  Note there is a one to many
relationship between Email -> DocumentStore via the FK.  Table
Email  EmailUUID //PK  In project B, DocumentStore.DocUUID
references Letter.LetterUUID:  Note there is a one to many
relationship between Letter -> DocumentStore via the FK.  Table
Letter  LetterUUID //PK  Email and Letter