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');
|
|
|
|
}
|
|
|
|
}
|