<?php

class m130916_125344_add_workperiod_report_generation_column extends MyDbMigration
{
	public function up()
	{
		if ($this->dbConnection->schema->getTable('work_periods')->getColumn('report_generation_date') == null)
			$this->addColumn('work_periods', 'report_generation_date', 'datetime');
			
	}

	public function down()
	{
		if ($this->dbConnection->schema->getTable('work_periods')->getColumn('report_generation_date') != null)
			$this->dropColumn('work_periods', 'report_generation_date'); 
		return true; 
	}

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

	public function safeDown()
	{
	}
	*/
}