Skip to content

Commit 626376c

Browse files
fixes
1 parent 72da3a7 commit 626376c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/etlx/model.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,12 +1103,13 @@ func UpsertCustomFT(dbCon db.DBInterface, seed SeedData, targetDBName string) er
11031103
"created_at": now,
11041104
"updated_at": now, // always refresh updated_at
11051105
}
1106+
row["app_id"] = app["app_id"] // ensure app_id is in the row for insert/update
11061107
// Decide PK / unique key for existence check & where clause
11071108
var whereClause string
11081109
var whereClause2 string
11091110
var logKey string
11101111
_chk_params := []any{}
1111-
whereClause = `db = :db AND "table" = :table AND excluded = false`
1112+
whereClause = `db = ? AND "table" = ? AND excluded = false`
11121113
whereClause2 = `db = :db AND "table" = :table AND excluded = false`
11131114
_chk_params = []any{targetDBName, row["table"]}
11141115
logKey = fmt.Sprintf("%v", row["table"])

0 commit comments

Comments
 (0)