2014_10_12_000000_create_users_table.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. class CreateUsersTable extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. *
  10. * @return void
  11. */
  12. public function up()
  13. {
  14. Schema::create('users', function (Blueprint $table) {
  15. $table->id();
  16. $table->string('name')->nullable();
  17. $table->string('surname')->nullable();
  18. $table->string('username')->unique();
  19. $table->string('email')->unique();
  20. $table->timestamp('email_verified_at')->nullable();
  21. $table->string('password')->nullable();
  22. $table->string('dob')->nullable();
  23. $table->string('status_text')->nullable();
  24. $table->unsignedBigInteger('country_id')->nullable();
  25. $table->unsignedBigInteger('city_id')->nullable();
  26. $table->string('skill')->nullable();
  27. $table->text('about')->nullable();
  28. $table->unsignedInteger('group')->default(1);
  29. $table->string('ban_info')->nullable();
  30. $table->string('avatar_url')->nullable();
  31. $table->double('balance')->default(0);
  32. $table->unsignedInteger('verify')->default(0);
  33. $table->rememberToken();
  34. $table->timestamps();
  35. });
  36. }
  37. /**
  38. * Reverse the migrations.
  39. *
  40. * @return void
  41. */
  42. public function down()
  43. {
  44. Schema::dropIfExists('users');
  45. }
  46. }