NOTE: Use any section to test (I prefer In-Commerce → Manufacturers).
- identify 2 fields to be used in test:
- null one with null default value
- not_null one with empty string as default value
Part 1
- create new record with both fields filled-in > confirm that data is stored in db as-is
- edit record and remove value from both fields > confirm that data is stored in db as-is (before NULL was stored in null field instead of empty string)
Part 2
- change default field for both fields to non-empty string
- create record without changing default value of these fields > confirm that data is stored in db as-is
- edit record and remove value from both fields > confirm that data is stored in db as-is (before not null field would revert to default non-empty value)
- create record and immediately clear both fields > confirm that data is stored in db as-is (before not null field would revert to default non-empty value)
Part 3
- repeat all of above for numeric field (in previous diff there was a side effect, that empty string would be stored as 0 in numeric field instead of null)