Invalid ADD COLUMN syntax on Oracle
Reported by Ben Hood | November 14th, 2011 @ 10:41 AM | in 1.0.1 (closed)
The alter table builder produces invalid DDL for Oracle (from standard out):
Failed to prepare the database - attempted to execute the following statements for step 12:
________________________________________________________________________________
alter table pair add column allow_manual_scans number(1,0) default 0
________________________________________________________________________________
Oracle syntax should not contain the column keyword.
Here is the stack trace:
Caused by: java.sql.SQLSyntaxErrorException: ORA-00904: : invalid identifier
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:205) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1008) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374) ~[ojdbc6-11.2.0.1.0.jar:11.2.0.1.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0]
at oracle.ucp.jdbc.proxy.StatementProxyFactory.invoke(StatementProxyFactory.java:242) ~[ucp-11.2.0.1.0.jar:11.2.0.1.0]
at oracle.ucp.jdbc.proxy.PreparedStatementProxyFactory.invoke(PreparedStatementProxyFactory.java:124) ~[ucp-11.2.0.1.0.jar:11.2.0.1.0]
at $Proxy9.execute(Unknown Source) ~[na:na]
at net.lshift.hibernate.migrations.TraceableMigrationElement.prepareAndLogAndExecute(TraceableMigrationElement.java:40) ~[hibernate-migrations-1.0.jar:na]
at net.lshift.hibernate.migrations.AlterTableBuilder.apply(AlterTableBuilder.java:128) ~[hibernate-migrations-1.0.jar:na]
at net.lshift.hibernate.migrations.MigrationBuilder.apply(MigrationBuilder.java:89) ~[hibernate-migrations-1.0.jar:na]
at net.lshift.diffa.kernel.config.HibernateConfigStorePreparationStep$$anonfun$prepare$1$$anon$1$$anonfun$execute$1.apply(HibernateConfigStorePreparationStep.scala:85) ~[diffa-kernel-1.0.jar:na]
at net.lshift.diffa.kernel.config.HibernateConfigStorePreparationStep$$anonfun$prepare$1$$anon$1$$anonfun$execute$1.apply(HibernateConfigStorePreparationStep.scala:81) ~[diffa-kernel-1.0.jar:na]
at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) ~[scala-library-2.9.1.jar:na]
at scala.collection.immutable.List.foreach(List.scala:45) ~[scala-library-2.9.1.jar:na]
at net.lshift.diffa.kernel.config.HibernateConfigStorePreparationStep$$anonfun$prepare$1$$anon$1.execute(HibernateConfigStorePreparationStep.scala:81) ~[diffa-kernel-1.0.jar:na]
at org.hibernate.impl.SessionImpl.doWork(SessionImpl.java:1997) ~[hibernate-core-3.6.7-2L.jar:3.6.7-2L]
... 117 common frames omitted
Comments and changes to this ticket
-

Ben Hood November 14th, 2011 @ 10:42 AM
- Milestone set to 1.1
- Milestone order changed from 144 to 0
-

Ben Hood November 14th, 2011 @ 11:08 AM
(from [94c459b8a8abefdfe272143b97c35f8df9d1289c]) [#413] Added support for Oracle specific ALTER TABLE ADD XXX syntax https://github.com/lshift/diffa/commit/94c459b8a8abefdfe272143b97c3...
-

Ben Hood November 14th, 2011 @ 11:28 AM
(from [a5ca14aa57fb4841a9cb4c7bd6c358718bee476c]) Merge pull request #108 from lshift/413
[#413] Added support for Oracle specific ALTER TABLE ADD XXX syntax https://github.com/lshift/diffa/commit/a5ca14aa57fb4841a9cb4c7bd6c3...
-

Ben Hood November 14th, 2011 @ 05:31 PM
- State changed from new to closed
- Milestone changed from 1.1 to 1.0.1
Self QA-ed, hence closing.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A Real Time Differencing Tool.