I also encountered this need for my database project. I decided to share my findings here.
1) There is no path to the NOT NULL field without a default value when the data already exists ( Can I add a non-zero column without a DEFAULT value )
2) This topic has long been addressed. Here is the 2008 question ( adding a default column to an existing table in SQL Server )
3) The DEFAULT constraint is used to provide a default value for a column. A default value will be added to all new entries unless a different value is specified. ( https://www.w3schools.com/sql/sql_default.asp )
4) The Visual Studio database project that I use for development is really good for creating change scripts for you. This is a change script created to promote my database:
GO PRINT N'Altering [dbo].[PROD_WHSE_ACTUAL]...'; GO ALTER TABLE [dbo].[PROD_WHSE_ACTUAL] ADD [DATE] DATE DEFAULT getdate() NOT NULL;
-
Here are the steps I took to upgrade my database using Visual Studio for development.
1) Add a default value (Visual Studio SSDT: DB project: table designer) 
2) Use the schema comparison tool to generate a change scenario.
code already provided above
3) Review the data BEFORE applying the changes. 
4) View data AFTER changes are applied. 
SherlockSpreadsheets Jul 31 '18 at 20:15 2018-07-31 20:15
source share