43 lines
1.4 KiB
PHP
43 lines
1.4 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('media', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('name');
|
|
$table->text('address');
|
|
$table->string('link')->nullable();
|
|
$table->enum('type', ['online', 'cetak', 'radio', 'televisi']);
|
|
$table->enum('classification', ['lokal', 'regional', 'nasional']);
|
|
$table->string('journalism_organization')->nullable();
|
|
$table->string('journalism_organization_doc')->nullable();
|
|
$table->string('press_council_certificate')->nullable();
|
|
$table->string('press_council_certificate_doc')->nullable();
|
|
$table->string('edit_description')->nullable();
|
|
$table->enum('edit_status', ['0', '1', '2', '3'])->default('0');
|
|
$table->text('edit_rejection_reason')->nullable();
|
|
$table->unsignedBigInteger('company_id');
|
|
$table->foreign('company_id')->references('id')->on('companies');
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('media');
|
|
}
|
|
};
|