MCPcopy Create free account
hub / github.com/cloudquery/cloudquery / needsTableDrop

Function needsTableDrop

plugins/destination/mssql/client/changes.go:20–35  ·  view source on GitHub ↗
(change schema.TableColumnChange)

Source from the content-addressed store, hash-verified

18}
19
20func needsTableDrop(change schema.TableColumnChange) bool {
21 switch change.Type {
22 case schema.TableColumnChangeTypeAdd:
23 return change.Current.NotNull || change.Current.PrimaryKey
24 case schema.TableColumnChangeTypeRemove:
25 return change.Previous.NotNull || change.Previous.PrimaryKey
26 case schema.TableColumnChangeTypeUpdate:
27 // allow changing string to large string without a table drop
28 if change.Previous.Type == arrow.BinaryTypes.String && change.Current.Type == arrow.BinaryTypes.LargeString {
29 return false
30 }
31 return true
32 default:
33 return true
34 }
35}

Callers 1

unsafeChangesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected