DdlUtils
  1. DdlUtils
  2. DDLUTILS-267

Modify source database a column from nvarchar(1) to nvarchar(10), Platform.alterTables did not modify target database table column.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: Core - SqlServer
    • Labels:
      None
    • Environment:
      sql server 2000

      Description

      Modify source database a column from nvarchar(1) to nvarchar(10), Platform.alterTables did not modify target database table column to nvarchar(10) .
      And remove source database a column that has default value, Platform.alterTables target database throw exception :
      Exception in thread "main" org.apache.ddlutils.DatabaseOperationException: Error while executing SQL ALTER TABLE acct_analysis_tab DROP COLUMN is_stop
      at org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(PlatformImplBase.java:331)
      at org.apache.ddlutils.platform.PlatformImplBase.alterTables(PlatformImplBase.java:573)
      at org.apache.ddlutils.platform.PlatformImplBase.alterTables(PlatformImplBase.java:507)
      at test.M.main(M.java:36)
      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: object 'DF_acct_analis_st_7E6CC920' depends column 'is_stop'。
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:196)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(SQLServerStatement.java:1454)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(SQLServerStatement.java:786)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement$StmtExecCmd.doExecute(SQLServerStatement.java:685)
      at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:4026)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1416)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:185)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:160)
      at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeUpdate(SQLServerStatement.java:642)
      at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:225)
      at org.apache.ddlutils.platform.PlatformImplBase.evaluateBatch(PlatformImplBase.java:309)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Thomas Dudziak
            Reporter:
            fengrunlzk
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development