Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
m120406_102639_user_optional_username.php
1 <?php
2 /**
3  * Gentics Portal.Node PHP
4  * Author & Copyright (c) by Gentics Software GmbH
5  * sales@gentics.com
6  * http://www.gentics.com
7  * Licenses can be found in the LICENSE.txt file in the root-folder of this installation
8  * You must not use this software without a valid license agreement.
9  */
10 class m120406_102639_user_optional_username extends CDbMigration
11 {
12  public function up()
13  {
14  $this->dropIndex('users_username_idx', '{{users}}');
15  $this->alterColumn('{{users}}', 'username', 'varchar(255)');
16  }
17 
18  public function down()
19  {
20  $this->createIndex('username', '{{users}}', 'username', true);
21  $this->alterColumn('{{users}}', 'username', 'varchar(255) NOT NULL');
22  }
23 
24  /*
25  // Use safeUp/safeDown to do migration with transaction
26  public function safeUp()
27  {
28  }
29 
30  public function safeDown()
31  {
32  }
33  */
34 }