Files
timebank-cc-public/database/migrations/2022_08_02_085206_create_blogs_table.php
Ronald Huynen 2547717edb Initial commit
2026-03-23 21:37:59 +01:00

38 lines
833 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBlogsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('blogs', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('parent_blog_id');
$table->string('locale', 3);
$table->string('title');
$table->text('content');
$table->unsignedBigInteger('user_id');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('blogs');
}
}