Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
m120807_092317_friends.php
1 <?php
2 
3 class m120807_092317_friends extends CDbMigration
4 {
5 
6 
7  // Use safeUp/safeDown to do migration with transaction
8  public function safeUp()
9  {
10  $this->createTable('{{friendship}}', array(
11  'user1_id' => 'integer',
12  'user2_id' => 'integer',
13  'status' => 'integer',
14  'PRIMARY KEY(user1_id, user2_id)'
15  ));
16  }
17 
18  public function safeDown()
19  {
20  $this->dropTable('{{friendship}}');
21  }
22 
23 }