Skip to content

Commit

Permalink
NO-SNOW Make schema evolution add columns idempotent (snowflakedb#734)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-xhuang authored and sudeshwasnik committed Feb 16, 2024
1 parent df42e0a commit 048c6fe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ public boolean hasSchemaEvolutionPermission(String tableName, String role) {
public void appendColumnsToTable(String tableName, Map<String, String> columnToType) {
checkConnection();
InternalUtils.assertNotEmpty("tableName", tableName);
StringBuilder appendColumnQuery = new StringBuilder("alter table identifier(?) add column ");
StringBuilder appendColumnQuery = new StringBuilder("alter table identifier(?) add column if not exists ");
boolean first = true;
StringBuilder logColumn = new StringBuilder("[");
for (String columnName : columnToType.keySet()) {
Expand Down

0 comments on commit 048c6fe

Please sign in to comment.