setTableVersion() public méthode

Set table version.
public setTableVersion ( string $name, integer $version )
$name string Table name.
$version integer Table version.
    /**
     * Create NameID table in SQL, if it is missing.
     *
     * @param SimpleSAML_Store_SQL $store  The datastore.
     */
    private static function createTable(SimpleSAML_Store_SQL $store)
    {
        if ($store->getTableVersion('saml_PersistentNameID') === 1) {
            return;
        }
        $query = 'CREATE TABLE ' . $store->prefix . '_saml_PersistentNameID (
			_idp VARCHAR(256) NOT NULL,
			_sp VARCHAR(256) NOT NULL,
			_user VARCHAR(256) NOT NULL,
			_value VARCHAR(40) NOT NULL,
			UNIQUE (_idp, _sp, _user)
		)';
        $store->pdo->exec($query);
        $query = 'CREATE INDEX ' . $store->prefix . '_saml_PersistentNameID_idp_sp ON ' . $store->prefix . '_saml_PersistentNameID (_idp, _sp)';
        $store->pdo->exec($query);
        $store->setTableVersion('saml_PersistentNameID', 1);
    }
    /**
     * Create logout table in SQL, if it is missing.
     *
     * @param SimpleSAML_Store_SQL $store  The datastore.
     */
    private static function createLogoutTable(SimpleSAML_Store_SQL $store)
    {
        if ($store->getTableVersion('saml_LogoutStore') === 1) {
            return;
        }
        $query = 'CREATE TABLE ' . $store->prefix . '_saml_LogoutStore (
			_authSource VARCHAR(30) NOT NULL,
			_nameId VARCHAR(40) NOT NULL,
			_sessionIndex VARCHAR(50) NOT NULL,
			_expire TIMESTAMP NOT NULL,
			_sessionId VARCHAR(50) NOT NULL,
			UNIQUE (_authSource, _nameID, _sessionIndex)
		)';
        $store->pdo->exec($query);
        $query = 'CREATE INDEX ' . $store->prefix . '_saml_LogoutStore_expire ON ' . $store->prefix . '_saml_LogoutStore (_expire)';
        $store->pdo->exec($query);
        $query = 'CREATE INDEX ' . $store->prefix . '_saml_LogoutStore_nameId ON ' . $store->prefix . '_saml_LogoutStore (_authSource, _nameId)';
        $store->pdo->exec($query);
        $store->setTableVersion('saml_LogoutStore', 1);
    }