36 lines
581 B
PHP
36 lines
581 B
PHP
|
<?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');
|
||
|
}
|
||
|
|
||
|
}
|