<?php

class m130212_094125_change_users_table extends MyDbMigration
{
  public function up()
  {
    $this->execute(
      "DROP TABLE IF EXISTS `users`;
      CREATE TABLE IF NOT EXISTS `users` (
        `id` int(11) NOT NULL AUTO_INCREMENT,
        `username` varchar(256) NOT NULL,
        `password` varchar(256) NOT NULL,
        `email` varchar(256) NOT NULL,
        `superuser` int(1) NOT NULL DEFAULT '0',
        `status` varchar(256) NOT NULL,
        `create_time` datetime NOT NULL,
        `update_time` datetime NOT NULL,
        PRIMARY KEY (`id`),
    UNIQUE KEY `user_username` (`username`),
    UNIQUE KEY `user_email` (`email`)
  ) ENGINE=MyISAM  DEFAULT CHARSET=utf8;"
);
  }

  public function down()
  {
    echo "m130212_094125_change_users_table does not support migration down.\n";
    return false;
  }

}
