(ctx context.Context, tableName string, columnName string, columnType string)
| 189 | } |
| 190 | |
| 191 | func (c *Client) addColumn(ctx context.Context, tableName string, columnName string, columnType string) error { |
| 192 | sql := "alter table " + identifier(tableName) + " add column " + identifier(columnName) + " " + identifier(columnType) |
| 193 | if _, err := c.db.ExecContext(ctx, sql); err != nil { |
| 194 | return fmt.Errorf("failed to add column %s on table %s: %w", columnName, tableName, err) |
| 195 | } |
| 196 | return nil |
| 197 | } |
| 198 | |
| 199 | func (c *Client) createTableIfNotExist(table *schema.Table) error { |
| 200 | var sb strings.Builder |
no test coverage detected