mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 22:06:30 +00:00
fix detection label
fix schema migrator for enums
This commit is contained in:
@@ -85,6 +85,9 @@ public static class SchemaMigrator
|
||||
|
||||
if (underlyingType == typeof(bool))
|
||||
return $"NOT NULL DEFAULT {(Convert.ToBoolean(defaultValue) ? 1 : 0)}";
|
||||
|
||||
if (underlyingType.IsEnum)
|
||||
return $"NOT NULL DEFAULT {(int)defaultValue}";
|
||||
|
||||
if (underlyingType.IsValueType && defaultValue is IFormattable f)
|
||||
return $"NOT NULL DEFAULT {f.ToString(null, System.Globalization.CultureInfo.InvariantCulture)}";
|
||||
|
||||
Reference in New Issue
Block a user