# What does the associatedWith attribute of \<createIndex\> do?

**URL:** <https://forum.liquibase.org/t/what-does-the-associatedwith-attribute-of-createindex-do/614>\
**Category:** General Discussion\
**Created:** [July 13, 2010, 6:04pm UTC](https://forum.liquibase.org/t/what-does-the-associatedwith-attribute-of-createindex-do/614 "2010-07-13T18:04:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpjust](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@cpjust](https://forum.liquibase.org/u/cpjust)\
**Post date:** [July 13, 2010, 6:04pm UTC](https://forum.liquibase.org/t/what-does-the-associatedwith-attribute-of-createindex-do/614/1 "2010-07-13T18:04:00Z")

</div>

Hi,  
After updating to the latest revision of the liquibase code I noticed that Diff is adding some ‘associatedWith’ attributes to the tags, but I can’t find any reference to it here:  
[http://www.liquibase.org/manual/create\_index](http://www.liquibase.org/manual/create_index)

What exactly does that attribute do?

---

<div class="post-metadata">

**Author:** ![nvoxland](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@nvoxland](https://forum.liquibase.org/u/nvoxland)\
**Post date:** [July 13, 2010, 6:04pm UTC](https://forum.liquibase.org/t/what-does-the-associatedwith-attribute-of-createindex-do/614/2 "2010-07-13T18:04:00Z")

</div>

It is a new partially complete feature with 2.0 and I haven not gotten it documented yet.&nbsp; The possible values are primaryKey, foreignKey, uniqueConstraint, none.&nbsp; The idea is that it may solve the problem of some databases creating indexes on primary keys and foreign keys and constraints and others not.&nbsp; If we have createIndex changes tagged with the reason, we can skip the creation of them if the database will inherently create one.

When I do document it, I am going to mark it as experimental.&nbsp; There is a lot of questions on what to do with how the diff tool should logically work, and it will be the focus of 2.1.&nbsp; The associatedWith field may go away depending on what is decided.

Nathan
