Magento 2 – InstallData script doesn´t add column to my ‘customer_entitiy’

I´m now trying to add a custom attribute for like 5 hours now. It drives me nuts that I dont find the solution hope you can help me.

I want a custom attribute to be displayed and saved when the user wants to register in the frontend.

What I did :

  1. Create Module

module.xml -> app/code/Magento/CustomerAttribute/etc

<?xml version="1.0" encoding="UTF-8"?> <config  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">     <module name="Magento_CustomerAttribute"  setup_version="1.0.0">         <sequence>             <module name="Magento_Customer"/>         </sequence>     </module> </config> 
  1. Create InstallData.php with my custom value

InstallData.php -> app/code/Magento/CustomerAttribute/Setup

<?php  namespace Magento\CustomerAttribute\Setup;  use Magento\Customer\Setup\CustomerSetupFactory; use Magento\Customer\Model\Customer; use Magento\Eav\Model\Entity\Attribute\Set as AttributeSet; use Magento\Eav\Model\Entity\Attribute\SetFactory as AttributeSetFactory; use Magento\Framework\Setup\InstallDataInterface; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; /**  * @codeCoverageIgnore  */ class InstallData implements InstallDataInterface {      /**      * @var CustomerSetupFactory      */     protected $  customerSetupFactory;      /**      * @var AttributeSetFactory      */     private $  attributeSetFactory;      /**      * @param CustomerSetupFactory $  customerSetupFactory      * @param AttributeSetFactory $  attributeSetFactory      */     public function __construct(         CustomerSetupFactory $  customerSetupFactory,         AttributeSetFactory $  attributeSetFactory     ) {         $  this->customerSetupFactory = $  customerSetupFactory;         $  this->attributeSetFactory = $  attributeSetFactory;     }      /**      * {@inheritdoc}      */     public function install(ModuleDataSetupInterface $  setup, ModuleContextInterface $  context)     {          /** @var CustomerSetup $  customerSetup */         $  customerSetup = $  this->customerSetupFactory->create(['setup' => $  setup]);          $  customerEntity = $  customerSetup->getEavConfig()->getEntityType('customer');         $  attributeSetId = $  customerEntity->getDefaultAttributeSetId();          /** @var $  attributeSet AttributeSet */         $  attributeSet = $  this->attributeSetFactory->create();         $  attributeGroupId = $  attributeSet->getDefaultGroupId($  attributeSetId);          $  customerSetup->addAttribute(Customer::ENTITY, 'kndnumber', [             'type' => 'varchar',             'label' => 'Kunden nummer',             'input' => 'text',             'required' => false,             'visible' => true,             'user_defined' => true,             'sort_order' => 1000,             'position' => 1000,             'system' => 0,         ]);          $  attribute = $  customerSetup->getEavConfig()->getAttribute(Customer::ENTITY, 'kndnumber')             ->addData([                 'attribute_set_id' => $  attributeSetId,                 'attribute_group_id' => $  attributeGroupId,                 'used_in_forms' => ['adminhtml_customer_address', 'customer_address_edit', 'customer_register_address'],             ]);          $  attribute->save();     } } 

After running php bin/magento setup:upgrade nothing happens the field was not added to the table customer_entitiy. phpmyadmin

I tryed every tutorial on the Internet and still cant get it working. If I could debug that thing it would be a bit easier for developers.

Do you have any suggestions why this script doesnt work?