Setup/Schema/Shared.php
public function createConsentTable($installer, $tableName)
    {
        $emailContactConsentTable = $installer->getConnection()->newTable($installer->getTable($tableName));
        $emailContactConsentTable = $this->addColumnForConsentTable($emailContactConsentTable);
        $emailContactConsentTable = $this->addIndexToConsentTable($installer, $emailContactConsentTable);
        $emailContactConsentTable = $this->addKeyForConsentTable($installer, $emailContactConsentTable);
        $emailContactConsentTable->setComment('Email contact consent table.');
        $installer->getConnection()->createTable($emailContactConsentTable);
    }
public function createConsentTable($installer, $tableName)
    {
        $emailContactConsentTable = $installer->getConnection()->newTable($installer->getTable($tableName));
        $emailContactConsentTable = $this->addColumnForConsentTable($emailContactConsentTable);
        $emailContactConsentTable = $this->addIndexToConsentTable($installer, $emailContactConsentTable);
        $emailContactConsentTable = $this->addKeyForConsentTable($installer, $emailContactConsentTable);
        $emailContactConsentTable->setComment('Email contact consent table.');
        $installer->getConnection()->createTable($emailContactConsentTable);
    }
public function createConsentTable ( $ installer , $ tableName ) { $ emailContactConsentTable = $ installer -> getConnection ( ) -> newTable ( $ installer -> getTable ( $ tableName ) ) ; $ emailContactConsentTable = $ this -> addColumnForConsentTable ( $ emailContactConsentTable ) ; $ emailContactConsentTable = $ this -> addIndexToConsentTable ( $ installer , $ emailContactConsentTable ) ; $ emailContactConsentTable = $ this -> addKeyForConsentTable ( $ installer , $ emailContactConsentTable ) ; $ emailContactConsentTable -> setComment ( 'Email contact consent table.' ) ; $ installer -> getConnection ( ) -> createTable ( $ emailContactConsentTable ) ; }
Create consent table

@param SchemaSetupInterface $installer
@param string $tableName
Create consent table