photo/database/migrations/0040-make_people.php

36 lines
585 B
PHP
Raw Permalink Normal View History

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