I have tables like Customer
, Purchase
etc which sometimes have associated documents with them, by documents I mean some file somewhere (like a scanned drivers license or something)
We cannot have the application upload these documents straight into the database so instead I have a uniqueidentifier column for these (Should I have a file hash instead?)
My question:
In the future we might have more documents associated with a table, so I was thinking of adding extra fields like:
Customer
+DriversLicenseDoc
+Document1//for the future
+Document2 //future use
So in the future if they do decide they want another document I will just have to update my entity-framework model and rename the column in my model and the database won't have to change?
Is this how its generally done? Any better ideas? The downside I see is I will have to keep all these future values nullable? Maybe thats not a downside?
Also wold like to hear thoughts on how you generally cope with changes in database schema after deployment?