public static void ChangeColumnTypeWithSchema(this ITransformationProvider database, string table, ColumnInfo column) { if (ColumnExistsWithSchema(database, table, column.Name)) database.ExecuteNonQuery(string.Format("ALTER TABLE {0} ALTER COLUMN {1} {2}", table, column.Name, column.Type)); }
public static void ChangeColumnSizeWithSchema(this ITransformationProvider database, string table, ColumnInfo column) { if (ColumnExistsWithSchema(database, table, column.Name)) { database.ExecuteNonQuery(string.Format("ALTER TABLE {0} ALTER COLUMN {1} {2}({3})", table, column.Name, column.Type, column.Size)); } }