<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Artisan;

class RemovePAndPContentType extends Migration
{
    public function up(): void
    {
        $type = \Drupal::entityTypeManager()->getStorage('node_type')->load('p_and_p');

        if ($type) {
            $type->delete();
        }

        Artisan::call('models:rebuild');
    }
}
