| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Support\Facades\Schema;
- return new class extends Migration
- {
- /**
- * Run the migrations.
- */
- public function up(): void
- {
- Schema::create('schedules', function (Blueprint $table) {
- $table->id();
- $table->date('installation_date');
- $table->boolean('manual')->default(false);
- $table->foreignId('order_id')->nullable()->constrained('orders')->cascadeOnDelete();
- $table->foreignId('district_id')->constrained('districts')->cascadeOnDelete();
- $table->foreignId('area_id')->constrained('areas')->cascadeOnDelete();
- $table->text('object_address');
- $table->string('source')->default('Ручной');
- $table->string('address_code')->nullable();
- $table->string('object_type')->nullable();
- $table->text('mafs');
- $table->integer('mafs_count');
- $table->foreignId('brigadier_id')->constrained('users')->cascadeOnDelete();
- $table->text('comment')->nullable();
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('schedules');
- }
- };
|