<?php

class m141119_080953_create_notification_table extends MyDbMigration
{

  public function up()
  {    
  	if($this->getTable('notification'))
  		return;
  	
    $this->execute("
        CREATE TABLE `notification` (
  `id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
  `setting_id` INTEGER UNSIGNED NOT NULL,
  `object_id` INTEGER UNSIGNED NOT NULL,
  `status` VARCHAR(255) NOT NULL,
  `read` DATETIME NOT NULL,
  `epoch` DATETIME NOT NULL,
  PRIMARY KEY (`id`)
);        
        ");
  }

  public function down()
  {
    $this->dropTable("notification");
    return true;
  }

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}