35 lines
718 B
PHP
Executable File
35 lines
718 B
PHP
Executable File
<?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');
|
|
}
|
|
}
|