(ctx context.Context, table *schema.Table)
| 181 | } |
| 182 | |
| 183 | func (c *Client) recreateTable(ctx context.Context, table *schema.Table) error { |
| 184 | sql := "drop table if exists " + identifier(table.Name) |
| 185 | if _, err := c.db.ExecContext(ctx, sql); err != nil { |
| 186 | return fmt.Errorf("failed to drop table %s: %w", table.Name, err) |
| 187 | } |
| 188 | return c.createTableIfNotExist(table) |
| 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) |
no test coverage detected