commands/SeedController.php
public function actionSeed()
  {
    $tx = $this->db->beginTransaction();
    try
    {
      $this->seed();
      $tx->commit();
    }
    catch (Exception $e)
    {
      throw new Exception($e->getMessage());
      $tx->rollback();
    }
  }
public function actionSeed()
  {
    $tx = $this->db->beginTransaction();
    try
    {
      $this->seed();
      $tx->commit();
    }
    catch (Exception $e)
    {
      throw new Exception($e->getMessage());
      $tx->rollback();
    }
  }
public function actionSeed ( ) { $ tx = $ this -> db -> beginTransaction ( ) ; try { $ this -> seed ( ) ; $ tx -> commit ( ) ; } catch ( Exception $ e ) { throw new Exception ( $ e -> getMessage ( ) ) ; $ tx -> rollback ( ) ; } }
This command is used when typing yiic seed. Demo data should be created here
This command is used when typing yiic seed . Demo data should be created here