(ctx context.Context, table *schema.Table, changes []schema.TableColumnChange)
| 98 | } |
| 99 | |
| 100 | func (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 | |
| 111 | func (*Client) canAutoMigrate(changes []schema.TableColumnChange) bool { |
| 112 | for _, change := range changes { |
no test coverage detected