<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddQaFollowupToNotificationsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		if (Schema::hasTable('notifications')) {
			Schema::table('notifications', function(Blueprint $table)
			{
				// Add columns or modify as needed
			});
			DB::statement("ALTER TABLE `notifications` CHANGE `related_type` `related_type` ENUM( 'repair', 'support', 'onsite', 'order', 'rma', 'message', 'qa', 'followup' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'repair'");
		}
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::table('notifications', function(Blueprint $table)
		{
			// DB::statement("ALTER TABLE `notifications` CHANGE `related_type` `related_type` ENUM( 'repair', 'support', 'onsite', 'order', 'rma', 'message' ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'repair'");
		});
	}

}
