Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove string concatenation in spanner DB update #4294

Merged
merged 2 commits into from
Dec 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/terraform/update_encoder/spanner_database.go.erb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ for i := len(oldDdls); i < len(newDdls); i++ {
updateDdls = append(updateDdls, newDdls[i].(string))
}

obj["statements"] = strings.Join(updateDdls, ",")
obj["statements"] = updateDdls
delete(obj, "name")
delete(obj, "instance")
delete(obj, "extraStatements")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ resource "google_spanner_database" "basic" {
"CREATE TABLE t1 (t1 INT64 NOT NULL,) PRIMARY KEY(t1)",
"CREATE TABLE t2 (t2 INT64 NOT NULL,) PRIMARY KEY(t2)",
"CREATE TABLE t3 (t3 INT64 NOT NULL,) PRIMARY KEY(t3)",
"CREATE TABLE t4 (t4 INT64 NOT NULL,) PRIMARY KEY(t4)",
]
deletion_protection = false
}
Expand Down