Database Defaults
Database Defaults are a part of a column in a table, it defines the value that should be put in the database incase the value is not given by whatever is accessing it.
In most cases its null, null can mean different things tho based on if the column is nullable or not.
If its nullable it simply sets “null” as the value if it isn't given.
If its not nullable it just means that there is no default value, which means in the case of the value not being set, an error happens.
To go around that you can set a value as default. For example the cancellation_deadline set in Tenants for Policies is set to 0 instead of null since its not nullable and should be filled with the value 0 incase it is not given.
Its also useful for if you're expanding your Database, where if you add a new column to a Table that is already deployed and has filled entries, adding a new column that can't be null without a default value will break the database integrity, as the already existing entries will have null as their value which is not allowed.
