images/database/migrations/0000_00_00_000001_create_im...

35 lines
715 B
PHP
Raw Permalink Normal View History

2017-10-03 17:05:46 +02:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateImagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
2020-11-28 00:05:00 +01:00
public function up(): void
2017-10-03 17:05:46 +02:00
{
Schema::create('images', function (Blueprint $table) {
2020-11-28 00:05:00 +01:00
$table->id();
2017-10-03 17:05:46 +02:00
$table->string('filename');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->unique('filename');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
2020-11-28 00:05:00 +01:00
public function down(): void
2017-10-03 17:05:46 +02:00
{
Schema::drop('images');
}
}