Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
m120419_143453_like.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 m120419_143453_like extends CDbMigration
11 {
12  public function up()
13  {
14  $this->createTable('{{likes}}', array(
15  'id' => 'pk',
16  'user_id' => 'integer',
17  'content_id' => 'string',
18  'createdate' => 'timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP',
19  ));
20  $this->createIndex('likes_user_id_idx', '{{likes}}', 'user_id');
21  $this->createIndex('likes_content_id_idx', '{{likes}}', 'content_id');
22  }
23 
24  public function down()
25  {
26  $this->dropTable('{{likes}}');
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 }