getTableName(NewsletterEntity::class); if (!$this->columnExists($tableName, 'wp_post_id')) { $this->connection->executeStatement(" ALTER TABLE {$tableName} ADD wp_post_id int NULL "); } if (!$this->indexExists($tableName, 'wp_post_id')) { $this->connection->executeQuery( "ALTER TABLE `{$tableName}` ADD INDEX `wp_post_id` (`wp_post_id`)" ); } } }