fix(sqlserver): skip rowversion columns when copying table data
Closes #6796
This commit is contained in:
1 parent
b0448da0cc
commit
68d2919219
2 files changed
+30
-1
No files matched your search
@@ -85,7 +85,8 @@ function isWritableTableDataCopyColumn(databaseType: DatabaseType | undefined, c
|
||||
return !extra.includes("generated always as (");
|
||||
}
|
||||
if (databaseType === "sqlserver") {
|
||||
return !extra.includes("computed");
|
||||
const baseDataType = column.data_type.trim().toLowerCase().split(/[\s(]/, 1)[0] ?? "";
|
||||
return !extra.includes("computed") && baseDataType !== "timestamp" && baseDataType !== "rowversion";
|
||||
}
|
||||
return !extra.includes("computed") && !(extra.includes("generated") && !extra.includes("identity"));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user