<?php

use Phinx\Migration\AbstractMigration;

class MigrationQueueNull extends AbstractMigration {

	/**
	 * Change Method.
	 *
	 * Write your reversible migrations using this method.
	 *
	 * More information on writing migrations is available here:
	 * http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
	 *
	 * @return void
	 */
	public function change() {
		$this->table('queue_processes')
			->changeColumn('created', 'datetime', ['null' => false, 'default' => null])
			->changeColumn('modified', 'datetime', ['null' => false, 'default' => null])
			->update();

		$this->table('queued_jobs')
			->changeColumn('created', 'datetime', ['null' => false, 'default' => null])
			->update();
	}

}
