hasTable('social_cache_doc')) { $table = $schema->getTable('social_cache_doc'); if (!$table->hasColumn('nid')) { $table->dropPrimaryKey(); } } if ($schema->hasTable('social_cache_actor')) { $table = $schema->getTable('social_cache_actor'); if (!$table->hasColumn('nid')) { $table->dropPrimaryKey(); } } return $schema; } }