38 lines
917 B
PHP
38 lines
917 B
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('articles', function (Blueprint $table) {
|
||
|
$table->id();
|
||
|
$table->string('slug');
|
||
|
$table->string('title');
|
||
|
$table->text('body');
|
||
|
$table->integer('category');
|
||
|
$table->boolean('is_collection');
|
||
|
$table->integer('tag_1');
|
||
|
$table->integer('tag_2');
|
||
|
$table->integer('tag_3');
|
||
|
$table->integer('tag_4');
|
||
|
$table->integer('tag_5');
|
||
|
$table->timestamps();
|
||
|
});
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Reverse the migrations.
|
||
|
*/
|
||
|
public function down(): void
|
||
|
{
|
||
|
Schema::dropIfExists('articles');
|
||
|
}
|
||
|
};
|