brianc / node-sql

SQL generation for node.js
MIT License
1.05k stars 191 forks source link

Oracle dialect generates wrong syntax for adding a column #332

Open chendricks opened 8 years ago

chendricks commented 8 years ago

Think this is an easy one. When doing tableDef.alter().addColumn(aColumnDef) the Oracle dialect is generating sql that says "ADD COLUMN" where it should simply say "ADD"

Solution is probably to add this to the oracle dialect right?

Oracle.prototype.visitAddColumn = function(addColumn) { this._visitingAddColumn = true; var result = ['ADD ' + this.visit(addColumn.nodes[0])]; this._visitingAddColumn = false; return result; };