framework/db/CDbMigration.php
public function up()
	{
		$transaction=$this->getDbConnection()->beginTransaction();
		try
		{
			if($this->safeUp()===false)
			{
				$transaction->rollback();
				return false;
			}
			$transaction->commit();
		}
		catch(Exception $e)
		{
			echo "Exception: ".$e->getMessage().' ('.$e->getFile().':'.$e->getLine().")\n";
			echo $e->getTraceAsString()."\n";
			$transaction->rollback();
			return false;
		}
	}
public function up()
	{
		$transaction=$this->getDbConnection()->beginTransaction();
		try
		{
			if($this->safeUp()===false)
			{
				$transaction->rollback();
				return false;
			}
			$transaction->commit();
		}
		catch(Exception $e)
		{
			echo "Exception: ".$e->getMessage().' ('.$e->getFile().':'.$e->getLine().")\n";
			echo $e->getTraceAsString()."\n";
			$transaction->rollback();
			return false;
		}
	}
public function up ( ) { $ transaction = $ this -> getDbConnection ( ) -> beginTransaction ( ) ; try { if ( $ this -> safeUp ( ) === false ) { $ transaction -> rollback ( ) ; return false ; } $ transaction -> commit ( ) ; } catch ( Exception $ e ) { echo "Exception: " . $ e -> getMessage ( ) . ' (' . $ e -> getFile ( ) . ':' . $ e -> getLine ( ) . ")\n" ; echo $ e -> getTraceAsString ( ) . "\n" ; $ transaction -> rollback ( ) ; return false ; } }
This method contains the logic to be executed when applying this migration.
Child classes may implement this method to provide actual migration logic.
@return boolean Returning false means, the migration will not be applied.
This method contains the logic to be executed when applying this migration . Child classes may implement this method to provide actual migration logic .