Discussion:
[Liquibase-user] Using composite keys
Kalana
2007-11-15 09:34:10 UTC
Permalink
Hi friends,

I'm quite new to liquibase and I wanna write liquibase changelog for the
below sql query.

create table USER_GROUP_PERMISSION (PERMISSION_ID bigint not null,
USER_GROUP_ID bigint not null, primary key (USER_GROUP_ID, PERMISSION_ID));

How to use composite keys with liquibase ?

thanks in advance.....
--
View this message in context: http://www.nabble.com/Using-composite-keys-tf4810742.html#a13764428
Sent from the LiquiBase - User mailing list archive at Nabble.com.
Nathan Voxland
2007-11-15 14:59:36 UTC
Permalink
You should be able to use



<createTable tableName=" USER_GROUP_PERMISSION">
<column name="PERMISSION_ID" type="bigint">
<constraints primaryKey="true"/>
</column>
<column name="USER_GROUP_ID" type="bigint">
<constraints primaryKey="true"/>
</column>
</createTable>

And it will generate the correct SQL.





________________________________

From: liquibase-user-***@lists.sourceforge.net
[mailto:liquibase-user-***@lists.sourceforge.net] On Behalf Of
Kalana
Sent: Thursday, November 15, 2007 3:34 AM
To: liquibase-***@lists.sourceforge.net
Subject: [Liquibase-user] Using composite keys



Hi friends, I'm quite new to liquibase and I wanna write liquibase
changelog for the below sql query. create table USER_GROUP_PERMISSION
(PERMISSION_ID bigint not null, USER_GROUP_ID bigint not null, primary
key (USER_GROUP_ID, PERMISSION_ID)); How to use composite keys with
liquibase ? thanks in advance.....

________________________________

View this message in context: Using composite keys
<http://www.nabble.com/Using-composite-keys-tf4810742.html#a13764428>
Sent from the LiquiBase - User mailing list archive
<http://www.nabble.com/LiquiBase---User-f23276.html> at Nabble.com.
Continue reading on narkive:
Loading...