(a *AlterTableAction)
| 1547 | } |
| 1548 | |
| 1549 | func alterActionSQL(a *AlterTableAction) string { |
| 1550 | switch a.Type { |
| 1551 | case "ADD COLUMN": |
| 1552 | s := "ADD COLUMN " |
| 1553 | if a.ColumnDef != nil { |
| 1554 | s += columnDefSQL(a.ColumnDef) |
| 1555 | } |
| 1556 | return s |
| 1557 | case "DROP COLUMN": |
| 1558 | return "DROP COLUMN " + a.ColumnName |
| 1559 | case "ADD CONSTRAINT": |
| 1560 | if a.Constraint != nil { |
| 1561 | return "ADD " + tableConstraintSQL(a.Constraint) |
| 1562 | } |
| 1563 | return "ADD CONSTRAINT" |
| 1564 | default: |
| 1565 | return a.Type |
| 1566 | } |
| 1567 | } |
| 1568 | |
| 1569 | func mergeActionSQL(a *MergeAction) string { |
| 1570 | switch a.ActionType { |
no test coverage detected