Files
Test-Laravel-Eloquent-Basics/database/migrations/2021_11_16_074340_create_projects_table.php
T

34 lines
654 B
PHP
Raw Normal View History

2021-11-16 09:49:29 +02:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('projects', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
2021-11-16 10:45:45 +02:00
$table->softDeletes();
2021-11-16 09:49:29 +02:00
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('projects');
}
}