<?php

class m131016_081223_add_change_password_at_first_login extends MyDbMigration
{
	public function up()
	{
		if ($this->dbConnection->schema->getTable('users')->getColumn('refresh_password_at_first_login') == null)
			$this->addColumn('users', 'refresh_password_at_first_login', 'boolean');		
	}

	public function down()
	{
		if ($this->dbConnection->schema->getTable('users')->getColumn('refresh_password_at_first_login') != null)
			$this->dropColumn('users', 'refresh_password_at_first_login');		
		return true;
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}