Schema::create('country_license', function (Blueprint $table) {
$table->unsignedSmallInteger('license_id');
$table->foreign('license_id')->references('id')->on('licenses')->onUpdate('cascade');
$table->unsignedTinyInteger('country_id');
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade');
$table->string('region')->default('All');
$table->primary(['license_id', 'country_id', 'region']);
});
Schema::create('country_license', function (Blueprint $table) {
$table->unsignedSmallInteger('license_id');
$table->foreign('license_id')->references('id')->on('licenses')->onUpdate('cascade');
$table->unsignedTinyInteger('country_id');
$table->foreign('country_id')->references('id')->on('countries')->onUpdate('cascade');
$table->string('region')->default('All');
$table->primary(['license_id', 'country_id', 'region']);
});