Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

2023_09_12_014413_create_appearances_table.php 928B

1234567891011121314151617181920212223242526272829303132
  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('appearances', function (Blueprint $table) {
  13. $table->id();
  14. $table->foreignId('company_id')->constrained()->onDelete('cascade');
  15. $table->string('primary_color')->default('indigo');
  16. $table->string('font')->default('inter');
  17. $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
  18. $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
  19. $table->timestamps();
  20. });
  21. }
  22. /**
  23. * Reverse the migrations.
  24. */
  25. public function down(): void
  26. {
  27. Schema::dropIfExists('appearances');
  28. }
  29. };