Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
m120324_173222_account.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 m120324_173222_account extends CDbMigration
11 {
12  public function safeUp()
13  {
14  $this->createTable('{{accounts}}', array(
15  'id' => 'pk',
16  'user_id' => 'integer',
17  'service' => 'string NOT NULL',
18  'service_id' => 'string NOT NULL',
19  'data' => 'text',
20  ));
21  $this->createIndex('accounts_user_id_idx', '{{accounts}}', 'user_id');
22  }
23 
24  public function safeDown()
25  {
26  $this->dropTable('{{accounts}}');
27  }
28 
29  /*
30  // Use safeUp/safeDown to do migration with transaction
31  public function safeUp()
32  {
33  }
34 
35  public function safeDown()
36  {
37  }
38  */
39 }