File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed
Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 1111
1212#endregion
1313
14+ using System ;
1415using System . Data ;
1516
1617namespace DotNetProjects . Migrator . Framework ;
@@ -20,6 +21,8 @@ namespace DotNetProjects.Migrator.Framework;
2021/// </summary>
2122public class Column : IColumn , IDbField
2223{
24+ private object _defaultValue ;
25+
2326 public Column ( string name )
2427 {
2528 Name = name ;
@@ -159,7 +162,22 @@ public DbType Type
159162
160163 public ColumnProperty ColumnProperty { get ; set ; }
161164
162- public object DefaultValue { get ; set ; }
165+ public object DefaultValue
166+ {
167+ get => _defaultValue ;
168+ set
169+ {
170+ if ( value is DateTime defaultValueDateTime )
171+ {
172+ if ( defaultValueDateTime . Kind != DateTimeKind . Utc )
173+ {
174+ throw new Exception ( "We only accept UTC values as default DateTime values." ) ;
175+ }
176+ }
177+
178+ _defaultValue = value ;
179+ }
180+ }
163181
164182 public bool IsIdentity
165183 {
You can’t perform that action at this time.
0 commit comments