db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6882) Add functionality to ALTER TABLE: switch from GENERATED ALWAYS to GENERATED BY DEFAULT
Date Sat, 09 Apr 2016 15:37:25 GMT

    [ https://issues.apache.org/jira/browse/DERBY-6882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15233601#comment-15233601
] 

Bryan Pendleton commented on DERBY-6882:
----------------------------------------

I have no objections to porting this feature back to 10.12.

And thank you for adding the thorough tests.

A couple of the "jar lastcontents" diffs in your patch aren't actually
related to your change; they are just alphabetizations of already
existing class names. So you could commit those changes separately,
if you desired, to make your history slightly cleaner.

I had no problems applying and building your tests, and I read through
everything and it looks quite clean. I confirmed the AlterTableTest changes.
I tried running the new upgrade test 'standalone', i.e., with

   ant -Dderby.junit.testclass=o.a.dT.fT.t.uT.Changes10_13 junit-single

but I got a weird failure that made it look like something didn't get initialized.

I'm not very experienced with the upgrade suites; should I have been able
to run ONLY your new test in this fashion?

Meanwhile, I am running the entire upgrade suite now, but given my pokey
machine it will be a while before anything interesting occurs.

Anyway, full speed ahead, I should think. Thanks again.

> 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
>
>
> 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)

Mime
View raw message