Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

0001_01_01_000000_create_users_table.php 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. */
  10. public function up(): void
  11. {
  12. Schema::create('users', function (Blueprint $table) {
  13. $table->id();
  14. $table->string('name');
  15. $table->string('email')->unique();
  16. $table->timestamp('email_verified_at')->nullable();
  17. $table->string('password')->nullable();
  18. $table->rememberToken();
  19. $table->foreignId('current_company_id')->nullable();
  20. $table->foreignId('current_connected_account_id')->nullable();
  21. $table->string('profile_photo_path', 2048)->nullable();
  22. $table->timestamps();
  23. });
  24. Schema::create('password_reset_tokens', function (Blueprint $table) {
  25. $table->string('email')->primary();
  26. $table->string('token');
  27. $table->timestamp('created_at')->nullable();
  28. });
  29. Schema::create('sessions', function (Blueprint $table) {
  30. $table->string('id')->primary();
  31. $table->foreignId('user_id')->nullable()->index();
  32. $table->string('ip_address', 45)->nullable();
  33. $table->text('user_agent')->nullable();
  34. $table->longText('payload');
  35. $table->integer('last_activity')->index();
  36. });
  37. }
  38. /**
  39. * Reverse the migrations.
  40. */
  41. public function down(): void
  42. {
  43. Schema::dropIfExists('users');
  44. Schema::dropIfExists('password_reset_tokens');
  45. Schema::dropIfExists('sessions');
  46. }
  47. };