PHP Zend Doctrine\DBAL\Types\Type 位

PHP Zend Doctrine\DBAL\Types\Type bit

我将 Doctrine DBAL 与 Zend Famework 3 一起使用,我想使用 BIT(64) 字段。 我可以看到以下支持的类型: https://www.doctrine-project.org/api/dbal/2.7/Doctrine/DBAL/Types/Type.html 是否可以使用 BIT 字段类型扩展它:https://dev.mysql.com/doc/refman/8.0/en/bit-type.html?

我需要使用权限掩码之类的东西。

这是简单的代码:

namespace Migrations;

use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;

class Version1 extends AbstractMigration {
    /**
     * Upgrades the schema to its newer state.
     * @param Schema $schema
     */
    public function up(Schema $schema) {
        $table = $schema->createTable('user');
        $table->addColumn('id', 'integer', ['autoincrement' => true, 'unsigned' => true]);
        $table->addColumn('bitmask', 'bit??', []);
        $table->setPrimaryKey(['id']);
        $table->addOption('engine', 'InnoDB');
    }
}

我已经创建了正常的 BIGINT(20) UNSIGNED 字段,在 php 中将其用作 BIT 值并且一切正常。