Просмотр файла database/migrations/2018_04_20_180008_create_changemail_table.php

Размер файла: 788B
  1. <?php
  2.  
  3. declare(strict_types=1);
  4.  
  5. use Illuminate\Database\Migrations\Migration;
  6. use Illuminate\Database\Schema\Blueprint;
  7. use Illuminate\Support\Facades\Schema;
  8.  
  9. final class CreateChangemailTable extends Migration
  10. {
  11. /**
  12. * Migrate Up.
  13. */
  14. public function up(): void
  15. {
  16. if (! Schema::hasTable('changemail')) {
  17. Schema::create('changemail', function (Blueprint $table) {
  18. $table->increments('id');
  19. $table->integer('user_id');
  20. $table->string('mail', 50);
  21. $table->string('hash', 25);
  22. $table->integer('created_at');
  23. });
  24. }
  25. }
  26.  
  27. /**
  28. * Migrate Down.
  29. */
  30. public function down(): void
  31. {
  32. Schema::dropIfExists('changemail');
  33. }
  34. }