<?php

use App\Repositories\Contact;
use Illuminate\Database\Migrations\Migration;

class RenameFunctionsInContactsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Contact::where('function', 'Bestuurders')
            ->update(['function' => 'Bestuurder']);

        Contact::where('function', 'Klankbordgroepleden')
            ->update(['function' => 'Klankbordgroeplid']);
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Contact::where('function', 'Bestuurder')
            ->update(['function' => 'Bestuurders']);

        Contact::where('function', 'Klankbordgroeplid')
            ->update(['function' => 'Klankbordgroepleden']);
    }
}
