[ 
https://issues.apache.org/jira/browse/DERBY-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rick Hillegas updated DERBY-6882:
---------------------------------
    Attachment: derby-6882-02-aa-port_1738368_to_10.12.diff

Attaching derby-6882-02-aa-port_1738368_to_10.12.diff. This patch ports 
derby-6882-01-bb-withTests.diff from main to the 10.12
branch. Tests passed cleanly for me.

Some small changes had to be made to the original patch in order to make it 
work on 10.12:

1) The upgrade test case had to be moved from a 10.13-specific class into the 
10.12-specific class.

2) A try-with-resources block had to be re-coded so that it would compile down 
to JDK 6 byte code level.

Aleksei, let me know if you need assistance building the 10.12 branch.

Touches the following files:

 M      .
M       
java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbynet.jar.lastcontents
M       
java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents
M       
java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents
M       
java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents
M       
java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents
M       java/engine/org/apache/derby/impl/sql/compile/ColumnDefinitionNode.java
M       java/engine/org/apache/derby/impl/sql/compile/sqlgrammar.jj
M       java/engine/org/apache/derby/impl/sql/compile/ModifyColumnNode.java
M       java/engine/org/apache/derby/impl/sql/execute/ColumnInfo.java
M       
java/engine/org/apache/derby/impl/sql/execute/AlterTableConstantAction.java
M       java/engine/org/apache/derby/impl/sql/catalog/SYSCOLUMNSRowFactory.java
M       java/engine/org/apache/derby/loc/messages.xml
M       java/shared/org/apache/derby/shared/common/reference/SQLState.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/lang/AlterTableTest.java
M       
java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/Changes10_12.java


> Add functionality to ALTER TABLE: switch from GENERATED ALWAYS to GENERATED 
> BY DEFAULT
> --------------------------------------------------------------------------------------
>
>                 Key: DERBY-6882
>                 URL: https://issues.apache.org/jira/browse/DERBY-6882
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.12.1.1
>            Reporter: Aleksei Kovura
>            Assignee: Rick Hillegas
>              Labels: features
>         Attachments: derby-6882-01-aa-initialCode.diff, 
> derby-6882-01-bb-withTests.diff, derby-6882-02-aa-port_1738368_to_10.12.diff
>
>
> I'm trying to import data from another Derby database with foreignViews tool 
> because system tables got corrupted somehow (see 
> https://issues.apache.org/jira/browse/DERBY-6876). Tables contain generated 
> ID columns (created as "GENERATED ALWAYS"). Importing data and allowing Derby 
> to generate new IDs in generated columns will break relationships between 
> tables (old tables have counter gaps there due to deletes - IDs won't match).
> For a clean import without breaking DDL information in DB version control I 
> would like to be able to switch between generated types as follows:
>  
> ALTER TABLE table1 ALTER COLUMN col1 SET GENERATED BY DEFAULT [ AS IDENTITY]
> ALTER TABLE table1 ALTER COLUMN col1 SET GENERATED ALWAYS [ AS IDENTITY]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to