<?php

class m151016_150008_create_user_tracking_table extends MyDbMigration
{

  public function up()
  {
    $this->createTableIfNotExists ( 'user_tracking_table' );
    $this->addColumn ( 'user_tracking_table', 'action', 'string' );
    $this->addColumn ( 'user_tracking_table', 'id_user', 'int' );
    $this->addColumn ( 'user_tracking_table', 'table_name', 'string' );
    $this->addColumn ( 'user_tracking_table', 'primary_key', 'string' );
    $this->addColumn ( 'user_tracking_table', 'controller', 'string' );
    $this->addColumn ( 'user_tracking_table', 'epoch', 'datetime' );
    $this->addColumn ( 'user_tracking_table', 'data', 'varchar(63000)' );
  }

  public function down()
  {
    $this->dropTableIfExists ( 'user_tracking_table' );
    return true;
  }
}
    