Is it safe to add non-nullable columns in new tables of the schema in oracle?
Assuming that I want to preserve old data when migrating.
I have a database and a service that reads and writes from it. In the service, I have two dao classes (mappers), one for reading the database record another for creating. When I add new columns to the database, I obviously have to adjust the mappers accordingly to read and write to/from new columns.
The question is : If I add new non-nullable columns in new tables to the schema, what will happen to old records when I try to read them. Since the read mapper was adjusted to always read the new column, it will certainly check for that column in the schema and find it missing.
How do you approach this issue, do you set a default value to new non-nullable columns?