<?php

class m140819_171000_add_icon_to_timetable extends MyDbMigration
{
  public function up()
  {
    if ($this->dbConnection->schema->getTable('timetable')->getColumn('icon') == null)
      $this->addColumn('timetable', 'icon', 'string');
  }

  public function down()
  {
    if ($this->dbConnection->schema->getTable('timetable')->getColumn('icon') != null)
      $this->dropColumn('timetable', 'icon');

    return true;
  }
}