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

Method autoMigrateTable

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

Source from the content-addressed store, hash-verified

98}
99
100func (c *Client) autoMigrateTable(ctx context.Context, table *schema.Table, changes []schema.TableColumnChange) error {
101 for _, change := range changes {
102 if change.Type == schema.TableColumnChangeTypeAdd {
103 if err := c.addColumn(ctx, table.Name, change.Current.Name, c.arrowTypeToSqliteStr(change.Current.Type)); err != nil {
104 return err
105 }
106 }
107 }
108 return nil
109}
110
111func (*Client) canAutoMigrate(changes []schema.TableColumnChange) bool {
112 for _, change := range changes {

Callers 1

MigrateTablesMethod · 0.95

Calls 2

addColumnMethod · 0.95
arrowTypeToSqliteStrMethod · 0.95

Tested by

no test coverage detected