---
title: "How to Fix the \"A column of this table has more than one Primary key\" error"
canonical: "https://docs.vaultspeed.com/space/VPD/3320742268/How%20to%20Fix%20the%20%22A%20column%20of%20this%20table%20has%20more%20than%20one%20Primary%20key%22%20error"
format: markdown
---
It can happen that you get the error “A column of this table has more than one Primary key” while you just see only 1 primary key field on your object.

![image](media://c972a757-654e-4c28-9399-f3d40c584b1d)

Usually this is due to a field that was manually set as a primary key in one of your previous source releases, that now has become a primary key setting on the database that has been harvested through our agent.  This makes that internally we see 2 PK’s.  One that you set manually and one that was harvested from the database.

To fix this issue you should first disable the manually set primary key in VaultSpeed, before adding it to the database and reading in new source metadata.

So the best way of doing this would be:

- Create a new source release.  For performance, this can be done with the option to NOT ‘Re-import source metadata’.
- disable the manually set PK and lock your source release
- add the PK to the database
- create a new source release with the option to ‘import source metadata’ to true

![image](media://25d7a95f-5531-4a57-89da-1c734013397c)