Pagekit\Auth\Handler\DatabaseHandler::createTable PHP Метод

createTable() защищенный Метод

Устаревший: to be removed in Pagekit 1.0
protected createTable ( )
    protected function createTable()
    {
        $util = $this->connection->getUtility();
        if ($util->tableExists($this->config['table']) === false) {
            $util->createTable($this->config['table'], function ($table) {
                $table->addColumn('id', 'string', ['length' => 255]);
                $table->addColumn('user_id', 'integer', ['unsigned' => true, 'length' => 10, 'default' => 0]);
                $table->addColumn('access', 'datetime', ['notnull' => false]);
                $table->addColumn('status', 'smallint');
                $table->addColumn('data', 'json_array', ['notnull' => false]);
                $table->setPrimaryKey(['id']);
            });
        }
    }