Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

2024_11_13_214358_create_clients_table.php 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  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('clients', function (Blueprint $table) {
  13. $table->id();
  14. $table->foreignId('company_id')->constrained()->cascadeOnDelete();
  15. $table->string('name');
  16. $table->string('currency_code')->nullable();
  17. $table->string('account_number')->nullable();
  18. $table->string('website')->nullable();
  19. $table->text('notes')->nullable();
  20. $table->foreignId('created_by')->nullable()->constrained('users')->nullOnDelete();
  21. $table->foreignId('updated_by')->nullable()->constrained('users')->nullOnDelete();
  22. $table->timestamps();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. */
  28. public function down(): void
  29. {
  30. Schema::dropIfExists('clients');
  31. }
  32. };