$table->
addColumn($this->timeCol, Types::INTEGER
)->
setNotnull(true
);
break;
case 'sqlsrv':
$table->
addColumn($this->idCol, Types::TEXT
)->
setLength(128
)->
setNotnull(true
);
$table->
addColumn($this->dataCol, Types::BLOB
)->
setNotnull(true
);
$table->
addColumn($this->lifetimeCol, Types::INTEGER
)->
setUnsigned(true
)->
setNotnull(true
);
$table->
addColumn($this->timeCol, Types::INTEGER
)->
setUnsigned(true
)->
setNotnull(true
);
break;
default:
throw new \
DomainException(sprintf('Creating the session table is currently not implemented for PDO driver "%s".',
$this->driver
));
} $table->
setPrimaryKey([$this->idCol
]);
$table->
addIndex([$this->lifetimeCol
],
$this->lifetimeCol.'_idx'
);
} /**
* Creates the table to store sessions which can be called once for setup.
*
* Session ID is saved in a column of maximum length 128 because that is enough even
* for a 512 bit configured session.hash_function like Whirlpool. Session data is
* saved in a BLOB. One could also use a shorter inlined varbinary column
* if one was sure the data fits into it.
*
* @return void
*
* @throws \PDOException When the table already exists
* @throws \DomainException When an unsupported PDO driver is used
*/