您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

2023_09_12_014413_create_appearances_table.php 1.0KB

12345678910111213141516171819202122232425262728293031323334
  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->string('table_sort_direction')->default('asc');
  18. $table->unsignedTinyInteger('records_per_page')->default(10);
  19. $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
  20. $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
  21. $table->timestamps();
  22. });
  23. }
  24. /**
  25. * Reverse the migrations.
  26. */
  27. public function down(): void
  28. {
  29. Schema::dropIfExists('appearances');
  30. }
  31. };