Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

41 lines
1.2KB

  1. <?php
  2. use App\Util\MigrationHelper;
  3. use Illuminate\Database\Migrations\Migration;
  4. use Illuminate\Database\Schema\Blueprint;
  5. use Illuminate\Support\Facades\Schema;
  6. return new class extends Migration
  7. {
  8. /**
  9. * Run the migrations.
  10. */
  11. public function up(): void
  12. {
  13. Schema::create('users', function (Blueprint $table) {
  14. $helper = new MigrationHelper($table);
  15. $helper->baseColumn();
  16. $table->string('email')->unique()->comment('Email');
  17. $table->string('password')->comment('ログインパスワード');
  18. $table->string('kintone_id')->comment('KintoneID');
  19. });
  20. Schema::create('user_histories', function (Blueprint $table) {
  21. $helper = new MigrationHelper($table, true);
  22. $helper->baseColumn();
  23. $table->string('email')->comment('Email');
  24. $table->string('password')->comment('ログインパスワード');
  25. $table->string('kintone_id')->comment('KintoneID');
  26. });
  27. }
  28. /**
  29. * Reverse the migrations.
  30. */
  31. public function down(): void
  32. {
  33. Schema::dropIfExists('users');
  34. Schema::dropIfExists('user_histories');
  35. }
  36. };