<?php

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

class UpdateProvinceAgentId extends Migration {
	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up() {
		//
		Schema::table( 'users', function ( Blueprint $table ) {
			$table->string( 'province_agent_id' )->nullable();
		} );

		Schema::table( 'agent_districts', function ( Blueprint $table ) {
			$table->dropColumn( 'district_id' );
		} );

		Schema::table( 'agent_districts', function ( Blueprint $table ) {
			$table->string( 'district_id' )->nullable();
		} );
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down() {
		//
	}
}
