|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
New Topic: Why does SqlDatabaseSnapshot "remove PK indexes"A new topic, 'Why does SqlDatabaseSnapshot "remove PK indexes"', has been made on a board you are watching.
You can see it at http://liquibase.org/forum/index.php?topic=195.new#new The text of the topic is shown below: I've create several tables in Postgres with Indexes, Primary Keys and Foreign Keys. When I run generateChangeLog it wasn't creating all of the indexes that I specified in PGAdmin. While stepping through the LiquiBase code (v 1.9.4), I found that it is removing any indexes that are associated with Primary Keys (PKs), Foreign Keys (FKs) and Unique Constraints. Quote Set<Index> indexesToRemove = new HashSet<Index>(); //remove PK indexes for (Index index : indexes) { for (PrimaryKey pk : primaryKeys) { if (index.getTable().getName().equalsIgnoreCase(pk.getTable().getName()) && index.getColumnNames().equals(pk.getColumnNames())) { indexesToRemove.add(index); } } for (ForeignKey fk : foreignKeys) { if (index.getTable().getName().equalsIgnoreCase(fk.getForeignKeyTable().getName()) && index.getColumnNames().equals(fk.getForeignKeyColumns())) { indexesToRemove.add(index); } } for (UniqueConstraint uc : uniqueConstraints) { if (index.getTable().getName().equalsIgnoreCase(uc.getTable().getName()) && index.getColumnNames().equals(uc.getColumnNames())) { indexesToRemove.add(index); } } } indexes.removeAll(indexesToRemove); I talked with other developers and our DBA and this is not desirable, at least for what we need. Based on the code, I don't see an option to turn this functionality off. Am I using it incorrectly? I know that I can manually at the XML needed to create the indexes, but it seems to me that I shouldn't have to do that. Is this an education issue on my part? Thank you. 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. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Liquibase-user mailing list Liquibase-user@... https://lists.sourceforge.net/lists/listinfo/liquibase-user |
| Free embeddable forum powered by Nabble | Forum Help |