public static bool UniqueConstraintExists(this IDataSyntax syntax, string name)
 {
     return(syntax.Table("INFORMATION_SCHEMA", "TABLE_CONSTRAINTS").Exists(new { CONSTRAINT_NAME = name, CONSTRAINT_TYPE = "UNIQUE" }));
 }
 public static bool IndexExists(this IDataSyntax syntax, string name)
 {
     return(syntax.Table("sys", "indexes").Exists(new { name = name }));
 }
 public static bool ForeignKeyExists(this IDataSyntax syntax, string name)
 {
     return(syntax.Table("INFORMATION_SCHEMA", "REFERENTIAL_CONSTRAINTS").Exists(new { CONSTRAINT_NAME = name }));
 }