public string Declaration() { var declaration = !IsPrimaryKey && AllowNulls ? "NULL" : "NOT NULL"; if (DefaultExpression.IsNotEmpty()) { declaration += " DEFAULT " + DefaultExpression; } return($"{declaration} {ColumnChecks.Select(x => x.FullDeclaration()).Join(" ")}".TrimEnd()); }
public virtual bool CanAdd() { return(AllowNulls || DefaultExpression.IsNotEmpty()); }