You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Anurag Shekhar (JIRA)" <ji...@apache.org> on 2008/02/25 22:18:51 UTC

[jira] Updated: (DERBY-3456) Allow removing not null from collumns particpating in unique constraint.

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

Anurag Shekhar updated DERBY-3456:
----------------------------------

    Attachment: derby-3456v1.diff

derby-3456v1.diff enables setting columns (if they are part of unique 
constraint) null able . 
If the backing index for the unique constraints are unique indexes (ie 
created before hard upgrade) it drops the index and recreates them with 
index type as duplicate and unique when not null.

Setting column null able works only after hard upgrade. If the data base
 is running in soft upgrade mode setting the column null able will 
continue to throw exception. 

modified files 
java/engine/org/apache/derby/impl/sql/compile/ModifyColumnNode.java

Check for Unique Constraint is now optional (only if the data dictionary 
version is not the latest one). 


java/engine/org/apache/derby/impl/sql/execute/DDLSingleTableConstantAction.java
added a new method () to drop backing index and recreating with type 
set to non unique and unique when not null.


Added code, while setting column to null able, to check if the column is 
participating in a unique constraint and if the unique constraint was 
created before hard upgrade (index type will be unique in this case) use 
the method in DDLSingleTableConstantAction to recreate the backing 
index.

> Allow removing not null from collumns particpating in unique constraint.
> ------------------------------------------------------------------------
>
>                 Key: DERBY-3456
>                 URL: https://issues.apache.org/jira/browse/DERBY-3456
>             Project: Derby
>          Issue Type: Sub-task
>          Components: SQL, Store
>    Affects Versions: 10.4.0.0
>         Environment: all
>            Reporter: Anurag Shekhar
>            Assignee: Anurag Shekhar
>         Attachments: derby-3456v1.diff
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.