for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePhotosTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('photos', function(Blueprint $table)
$table->increments('id');
$table->string('name');
$table->string('description')->nullable();
$table->string('file');
$table->integer('order')->unsigned();
$table->integer('album_id')->unsigned();
$table->foreign('album_id')->references('id')->on('albums');
$table->timestamps();
$table->softDeletes();
});
}
* Reverse the migrations.
public function down()
Schema::drop('photos');