# Change to primaryKeyExists precondition

**URL:** <https://forum.liquibase.org/t/change-to-primarykeyexists-precondition/3488>\
**Category:** General Discussion\
**Created:** [March 4, 2017, 1:56am UTC](https://forum.liquibase.org/t/change-to-primarykeyexists-precondition/3488 "2017-03-04T01:56:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GaryWilliams](https://avatars.discourse-cdn.com/v4/letter/g/edb3f5/32.png) [@GaryWilliams](https://forum.liquibase.org/u/GaryWilliams)\
**Post date:** [March 4, 2017, 1:56am UTC](https://forum.liquibase.org/t/change-to-primarykeyexists-precondition/3488/1 "2017-03-04T01:56:00Z")

</div>

In liquibase 3.4.2, this worked:

- changeSet:

&nbsp; &nbsp; id: 1450270295661-5

&nbsp; &nbsp; author: blah

&nbsp; &nbsp; preConditions:

&nbsp; &nbsp; &nbsp; &nbsp; onFail: MARK\_RAN

&nbsp; &nbsp; &nbsp; &nbsp; not:

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; primaryKeyExists:

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; primaryKeyName: data\_pkey

&nbsp; &nbsp; changes:

&nbsp; &nbsp; - addPrimaryKey:

&nbsp; &nbsp; &nbsp; &nbsp; columnNames: id, type

&nbsp; &nbsp; &nbsp; &nbsp; constraintName: data\_pkey

&nbsp; &nbsp; &nbsp; &nbsp; tableName: data

In liquibase 3.5.3, it must look like this:

- changeSet:

&nbsp; &nbsp; id: 1450270295661-5

&nbsp; &nbsp; author: blah

&nbsp; &nbsp; preConditions:

&nbsp; &nbsp; &nbsp; &nbsp; onFail: MARK\_RAN

&nbsp; &nbsp; &nbsp; &nbsp; not:

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; primaryKeyExists:

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; primaryKeyName: data\_pkey

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tableName: data

&nbsp; &nbsp; changes:

&nbsp; &nbsp; - addPrimaryKey:

&nbsp; &nbsp; &nbsp; &nbsp; columnNames: id, type

&nbsp; &nbsp; &nbsp; &nbsp; constraintName: data\_pkey

&nbsp; &nbsp; &nbsp; &nbsp; tableName: data

Or I get an exception: &nbsp;liquibase.exception.DatabaseException: java.sql.SQLException: Invalid argument in JDBC call: table: null

The change is easy enough to make, but a change to a changeset changes the checksum, which will break all future releases of my product, right? Is there some workaround to this?
