Gentics Portal.Node PHP API
 All Classes Namespaces Functions Variables Pages
m120625_142328_notify_mail_default.php
1 <?php
2 
3 class m120625_142328_notify_mail_default extends CDbMigration
4 {
5 
6 
7  // Use safeUp/safeDown to do migration with transaction
8  public function safeUp()
9  {
10  $this->update('{{profiles_fields}}', array('default' => 1), "varname='send_me_notifications'");
11  $this->execute('ALTER TABLE {{profiles}} MODIFY COLUMN send_me_notifications varchar(1) NOT NULL DEFAULT \'1\'');
12  }
13 
14  public function safeDown()
15  {
16  $this->update('{{profiles_fields}}', array('default' => 0), "varname='send_me_notifications'");
17  $this->execute('ALTER TABLE {{profiles}} MODIFY COLUMN send_me_notifications varchar(1) NOT NULL DEFAULT \'0\'');
18  }
19 
20 }