領収証発行サービス
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
932B

  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. MigrationHelper::createTable('contracts', $this->schema());
  14. MigrationHelper::createTable('contract_histories', $this->schema());
  15. }
  16. /**
  17. * Reverse the migrations.
  18. */
  19. public function down(): void
  20. {
  21. Schema::dropIfExists('contracts');
  22. Schema::dropIfExists('contract_histories');
  23. }
  24. private function schema()
  25. {
  26. return function (Blueprint $table, MigrationHelper $helper) {
  27. $helper->baseColumn();
  28. $table->string('name')->comment("契約者名")->nullable();
  29. $table->text('custom')->comment("カスタム")->nullable();
  30. };
  31. }
  32. };