A new topic, 'Missing FK Constraint bug during addColumn?', has been made on a 
board you are watching.

You can see it at
http://liquibase.org/forum/index.php?topic=25.new#new

The text of the topic is shown below:

I tried to add a couple of new columns with one column as a foreign key to 
another table and it didn’t create the FK constraint.  Am I don’t something 
wrong or is this a bug?


Rick Cromer


Here’s the XML for the change set.

      <changeSet id="182" author="cruml">
        <addColumn tableName="DID_LOT">
            <column name="VENDOR_ID" type="NUMBER(10)" >
                <constraints nullable="true" foreignKeyName="DID_LOT_VENDOR_FK" 
references="VENDOR(ID)" />
            </column>
            <column name="LOAD_DATE" type="date" defaultValueDate="SYSDATE" >
                <constraints nullable="false"/>
            </column>
        </addColumn>
      </changeSet>
 
When I run updateSQL or update the creation of the foreign key is not made.  
Here’s the updateSQL output below:

-- Ran at: 5/22/09 10:50 AM
-- Against: po...@jdbc:oracle:thin:@loghost:1521:ENTICE
-- LiquiBase version: 1.9.1
-- *********************************************************************
SELECT COUNT(*) FROM DATABASECHANGELOGLOCK WHERE ID=1;

-- Changeset post3Schema.xml::182::cruml::(MD5Sum: 
fedff0f6941fcc8c1866949687d3fb43)

-- Add new columns to the DID_LOT table

ALTER TABLE DID_LOT ADD VENDOR_ID NUMBER(10);
 
ALTER TABLE DID_LOT ADD LOAD_DATE DATE DEFAULT SYSDATE NOT NULL;

INSERT INTO DATABASECHANGELOG (DATEEXECUTED, AUTHOR, LIQUIBASE, DESCRIPTION, 
COMMENTS, MD5SUM, ID, FILENAME) VALUES (SYSDATE, 'cruml', '1.9.1', 'Add 
Column', 'Add new columns to the DID_LOT table', 
'fedff0f6941fcc8c1866949687d3fb43', '182', 'post3Schema.xml');

-- Release Database Lock

UPDATE DATABASECHANGELOGLOCK SET LOCKEDBY = NULL, LOCKGRANTED = NULL, LOCKED = 
0 WHERE  ID = 1;

Unsubscribe to new topics from this board by clicking here: 
http://liquibase.org/forum/index.php?action=notifyboard;board=1.0

Regards,
The LiquiBase Community Forum Team.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Liquibase-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/liquibase-user

Reply via email to