Commit 2012cda
committed
DestinationAppwrite: add overwrite and skip params
Per Jake's spec, migration destinations accept two new behavior flags:
- overwrite=true → use upsertDocuments() instead of createDocuments()
Replaces existing rows with the imported values. Naturally handles
duplicate ids.
- skip=true → wrap createDocuments() in skipDuplicates() scope guard.
Silently no-ops duplicate ids at the adapter layer (INSERT IGNORE
equivalent). Existing rows are preserved.
Default (both false): plain createDocuments, fails fast on
DuplicateException. Original behavior, unchanged for existing callers.
Precedence when both set: overwrite wins (upsert subsumes skip).
The existing skipRelationshipsExistCheck() FK-guard wrapper is
preserved in all three branches.1 parent 0d43b66 commit 2012cda
1 file changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
102 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
| |||
1067 | 1071 | | |
1068 | 1072 | | |
1069 | 1073 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
1074 | | - | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
1075 | 1087 | | |
1076 | | - | |
1077 | | - | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1078 | 1095 | | |
1079 | 1096 | | |
1080 | 1097 | | |
| |||
0 commit comments