From ddlutils-dev-return-1425-apmail-db-ddlutils-dev-archive=db.apache.org@db.apache.org Thu Apr 19 05:12:36 2007 Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 81016 invoked from network); 19 Apr 2007 05:12:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Apr 2007 05:12:36 -0000 Received: (qmail 60782 invoked by uid 500); 19 Apr 2007 05:12:42 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 60759 invoked by uid 500); 19 Apr 2007 05:12:42 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 60747 invoked by uid 99); 19 Apr 2007 05:12:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 22:12:42 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Apr 2007 22:12:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5D91B71407B for ; Wed, 18 Apr 2007 22:12:15 -0700 (PDT) Message-ID: <16968432.1176959535348.JavaMail.jira@brutus> Date: Wed, 18 Apr 2007 22:12:15 -0700 (PDT) From: "Thomas Dudziak (JIRA)" To: ddlutils-dev@db.apache.org Subject: [jira] Resolved: (DDLUTILS-169) Problem with backing indices for foreign keys In-Reply-To: <3449452.1176907875455.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DDLUTILS-169?page=3Dcom.atlass= ian.jira.plugin.system.issuetabpanels:all-tabpanel ] Thomas Dudziak resolved DDLUTILS-169. ------------------------------------- Resolution: Fixed > Problem with backing indices for foreign keys > --------------------------------------------- > > Key: DDLUTILS-169 > URL: https://issues.apache.org/jira/browse/DDLUTILS-169 > Project: DdlUtils > Issue Type: Bug > Components: Core - Derby/Cloudscape/JavaDB > Environment: Derby 10.2 on Windows > Reporter: Stefan Huber > Assigned To: Thomas Dudziak > > I created the following model in an empty derby db: > > > > > >
> > >
> > > > > > > > > >
>
> This worked fine. > But when i tried to update the model with the same definition (e.g. via a= n ant task with alterdatabase=3D"true") i got this error messages: > [ddlToDatabase] Index SQL070418040159390 needs to be removed from table D= ETAIL > [ddlToDatabase] Index SQL070418040159510 needs to be removed from table D= ETAIL > [ddlToDatabase] SQL Command DROP INDEX SQL070418040159390 failed with: De= r Index 'SQL070418040159390' wurde erstellt, um die Integrit=C3=A4tsbedingu= ng 'FK_A' durchzusetzen. Der Index kann nur gel=C3=B6scht werden, wenn die = Integrit=C3=A4tsbedingung gel=C3=B6scht wird. > [ddlToDatabase] SQL Command DROP INDEX SQL070418040159510 failed with: De= r Index 'SQL070418040159510' wurde erstellt, um die Integrit=C3=A4tsbedingu= ng 'FK_B' durchzusetzen. Der Index kann nur gel=C3=B6scht werden, wenn die = Integrit=C3=A4tsbedingung gel=C3=B6scht wird. > [ddlToDatabase] Executed 2 SQL command(s) with 2 error(s) > There seems to be a problem with foreign keys that refer to a primary key= column in the local table. If this column is only a part of the primary ke= y a new index is created for this single column. The alter database task tr= ies to delete this index which results in an error. > If the local column is not part of a primary key or the primary key consi= sts of this column only the alter database task works fine. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.