diff --git a/restrict_ip.install b/restrict_ip.install
index c9e308fbce399accdc505a13e76017f7b0e5273f..3026dcbf511cd33f6afc0381ba4757041957dd13 100644
--- a/restrict_ip.install
+++ b/restrict_ip.install
@@ -132,7 +132,7 @@ function restrict_ip_update_500001(): void {
 
   if (!$schema->indexExists('restrict_ip_whitelisted_ip_addresses', 'PRIMARY')) {
     // Add primary key to "restrict_ip_whitelisted_ip_addresses" table.
-    $schema->addPrimaryKey('restrict_ip_whitelisted_ip_addresses', ['path']);
+    $schema->addPrimaryKey('restrict_ip_whitelisted_ip_addresses', ['ip_address']);
   }
 }