Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. <?php
  2.  
  3. use Illuminate\Support\Facades\Schema;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Database\Migrations\Migration;
  6.  
  7. class CreateUsersTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. // Account for existing users table.
  17. if (Schema::hasTable('users')) {
  18. return;
  19. }
  20. Schema::create('users', function (Blueprint $table) {
  21. $table->increments('id');
  22. $table->integer('access_level')->unsigned()->default(10);
  23. $table->string('first_name');
  24. $table->string('last_name');
  25. $table->string('email')->unique();
  26. $table->string('password');
  27. $table->rememberToken();
  28. $table->timestamps();
  29. $table->softDeletes();
  30. });
  31. }
  32.  
  33. /**
  34. * Reverse the migrations.
  35. *
  36. * @return void
  37. */
  38. public function down()
  39. {
  40. Schema::dropIfExists('users');
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement