images/database/migrations/2017_10_03_135933_create_im...

35 lines
718 B
PHP

<?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
*/
public function up()
{
Schema::create('images', function (Blueprint $table) {
$table->integer('id', true);
$table->string('filename');
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->unique('filename');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('images');
}
}