photo/database/migrations/2016_06_03_055604_create_people_table.php

36 lines
581 B
PHP
Raw Normal View History

2016-06-22 05:49:20 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePeopleTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('people', function(Blueprint $table)
{
$table->integer('id', true);
$table->string('tag', 16)->unique('tag_UNIQUE');
$table->string('name', 64)->nullable();
$table->integer('date_birth')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('people');
}
}