File modules/cms/update/version/DBVersion000022.class.php
Last commit: Sun Oct 1 02:58:08 2023 +0200 Jan Dankert Refactoring: No it is possible to use 8 byte integers in the database
1 <?php 2 3 namespace cms\update\version; 4 5 use database\DbVersion; 6 use database\Column; 7 8 /** 9 * External user ids from sso services like openid. 10 * The user name alone is not unique any more 11 * 12 * @author Jan Dankert 13 * 14 */ 15 class DBVersion000022 extends DbVersion 16 { 17 /** 18 * 19 */ 20 public function update() 21 { 22 $table = $this->table('user'); 23 24 $table->column('issuer' )->type(Column::TYPE_VARCHAR )->charset('ascii')->size(50)->nullable()->add(); 25 $table->column('auth_type' )->type(Column::TYPE_INT )->defaultValue(1 )->add(); 26 $table->column('ldap_dn' )->drop(); 27 28 // OpenId subject identifiers may have up to 255 chars, so we have to increase the length 29 $table->column('name' )->type(Column::TYPE_VARCHAR )->charset('ascii')->modify(); 30 $table->column('fullname' )->type(Column::TYPE_VARCHAR )->modify(); 31 32 $table->dropUniqueIndex( ['name'] ); 33 $table->addUniqueIndex ( ['name','auth_type','issuer'] ); 34 } 35 } 36
Downloadmodules/cms/update/version/DBVersion000022.class.php
History Sun, 1 Oct 2023 02:58:08 +0200 Jan Dankert Refactoring: No it is possible to use 8 byte integers in the database Sat, 31 Oct 2020 02:35:54 +0100 Jan Dankert Save bytes and use the ascii charset for username and issuer. Sat, 31 Oct 2020 01:50:29 +0100 Jan Dankert Fix for Mysql < 5.6, the index must not exceed 767 bytes :-O Sat, 31 Oct 2020 00:43:29 +0100 Jan Dankert New: Support for OpenId Connect; Removed: Support for LDAP.