暂无描述

2014_10_12_000000_create_users_table.php 586B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Database\Migrations\Migration;
  4. class CreateUsersTable extends Migration {
  5. /**
  6. * Run the migrations.
  7. *
  8. * @return void
  9. */
  10. public function up()
  11. {
  12. Schema::create('users', function(Blueprint $table)
  13. {
  14. $table->increments('id');
  15. $table->string('name');
  16. $table->string('email')->unique();
  17. $table->string('password', 60);
  18. $table->rememberToken();
  19. $table->timestamps();
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. *
  25. * @return void
  26. */
  27. public function down()
  28. {
  29. Schema::drop('users');
  30. }
  31. }