Skip to content

Instantly share code, notes, and snippets.

@henriqueweiand
Last active August 7, 2019 16:00
Show Gist options
  • Save henriqueweiand/cee5bc2f822651d48526738c3af5a52a to your computer and use it in GitHub Desktop.
Save henriqueweiand/cee5bc2f822651d48526738c3af5a52a to your computer and use it in GitHub Desktop.
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 120);
$table->string('lastname', 120);
$table->string('email', 60);
$table->string('telephone', 32);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment