2019_05_21_214036_create_users_table.php 985 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. // Copyright 2019 Hackware SpA <human@hackware.cl>
  3. // "Hackware Web Services Core" is released under the MIT License terms.
  4. use Illuminate\Support\Facades\Schema;
  5. use Illuminate\Database\Schema\Blueprint;
  6. use Illuminate\Database\Migrations\Migration;
  7. class CreateUsersTable extends Migration
  8. {
  9. /**
  10. * Run the migrations.
  11. *
  12. * @return void
  13. */
  14. public function up()
  15. {
  16. Schema::create('users', function (Blueprint $table) {
  17. $table->string('uid', 100)->primary();
  18. $table->string('email', 100)->unique()->nullable();
  19. $table->string('password')->nullable();
  20. $table->string('display_name', 100)->nullable();
  21. $table->text('info')->nullable();
  22. $table->timestampsTz();
  23. $table->softDeletesTz();
  24. });
  25. }
  26. /**
  27. * Reverse the migrations.
  28. *
  29. * @return void
  30. */
  31. public function down()
  32. {
  33. Schema::dropIfExists('users');
  34. }
  35. }