dym-sh/database/migrations/2024_08_09_112756_create_ar...

38 lines
917 B
PHP
Raw Normal View History

2024-08-09 13:52:23 +02:00
<?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');
}
};