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

Method autoMigrateTable

plugins/destination/duckdb/client/migrate.go:71–80  ·  view source on GitHub ↗
(ctx context.Context, table *schema.Table, changes []schema.TableColumnChange)

Source from the content-addressed store, hash-verified

69}
70
71func (c *Client) autoMigrateTable(ctx context.Context, table *schema.Table, changes []schema.TableColumnChange) error {
72 for _, change := range changes {
73 if change.Type == schema.TableColumnChangeTypeAdd {
74 if err := c.addColumn(ctx, table.Name, change.Current.Name, arrowToDuckDB(change.Current.Type)); err != nil {
75 return err
76 }
77 }
78 }
79 return nil
80}
81
82func (*Client) canAutoMigrate(changes []schema.TableColumnChange) bool {
83 for _, change := range changes {

Callers 1

MigrateTablesMethod · 0.95

Calls 2

addColumnMethod · 0.95
arrowToDuckDBFunction · 0.85

Tested by

no test coverage detected