<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -125,6 +125,10 @@ abstract class DriverType(val name : String) {
   def primaryKeySetup(tableName : String, columnName : String) : List[String] = {
       List(&quot;ALTER TABLE &quot;+tableName+&quot; ADD CONSTRAINT &quot;+tableName+&quot;_PK PRIMARY KEY(&quot;+columnName+&quot;)&quot;)
   }
+
+  /** This defines the syntax for adding a column in an alter. This is
+   *  used because some DBs (Oracle, for one) use slightly different syntax. */
+  def alterAddColumn = &quot;ADD COLUMN&quot;
 }
 
 object DriverType {
@@ -369,6 +373,9 @@ object OracleDriver extends DriverType(&quot;Oracle&quot;) {
         stmt.executeUpdate
         handler(Left(stmt.getGeneratedKeys))
     }
+
+  // Oracle doesn't use &quot;COLUMN&quot; syntax when adding a column to a table
+  override def alterAddColumn = &quot;ADD&quot;
 }
 
 object MaxDbDriver extends DriverType(&quot;MaxDB&quot;) {</diff>
      <filename>lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/Driver.scala</filename>
    </modified>
    <modified>
      <diff>@@ -205,7 +205,7 @@ object Schemifier {
       (field.dbColumnNames(field.name) -- cols).foreach {
         colName =&gt;
         cmds += maybeWrite(performWrite, logFunc, connection) {
-          () =&gt; &quot;ALTER TABLE &quot;+table.dbTableName+&quot; ADD COLUMN &quot;+field.fieldCreatorString(connection.driverType, colName)
+          () =&gt; &quot;ALTER TABLE &quot;+table.dbTableName+&quot; &quot;+connection.driverType.alterAddColumn+&quot; &quot;+field.fieldCreatorString(connection.driverType, colName)
         }
         if ((!connection.driverType.pkDefinedByIndexColumn_?) &amp;&amp; field.dbPrimaryKey_?) {
           // Add primary key only when it has not been created by the index field itself.</diff>
      <filename>lift-persistence/lift-mapper/src/main/scala/net/liftweb/mapper/Schemifier.scala</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0f225b718f0261d521f82d7ae6baa18a2e804646</id>
    </parent>
  </parents>
  <author>
    <name>Derek Chen-Becker</name>
    <email>github@chen-becker.org</email>
  </author>
  <url>http://github.com/dpp/liftweb/commit/227cb935862806ecfd5860c48c22fa77a42d5c40</url>
  <id>227cb935862806ecfd5860c48c22fa77a42d5c40</id>
  <committed-date>2009-10-27T08:46:40-07:00</committed-date>
  <authored-date>2009-10-21T16:19:14-07:00</authored-date>
  <message>Fix Oracle ALTER TABLE syntax for column adds

Closes #86

Oracle uses the syntax &quot;ADD column_name&quot; instead of
&quot;ADD COLUMN column_name&quot;. Added a new def on DriverType
to allow different drivers to override the default behavior.</message>
  <tree>617aa08676f80063b9ef0da306751b3761f166eb</tree>
  <committer>
    <name>Derek Chen-Becker</name>
    <email>github@chen-becker.org</email>
  </committer>
</commit>
