| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?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::disableForeignKeyConstraints();
- Schema::create('projects', function (Blueprint $table) {
- $table->id();
- $table->foreignId('region_id')->references('id')->on('regions')->comment('所屬地區');
- $table->json("name")->comment("專案項目名稱");
- $table->json("address")->comment("基本資料: 地址");
- $table->json("floor_plan")->comment("樓層規劃");
- $table->json("building_structure")->comment("建築結構");
- $table->json("design_unit")->comment("設計團隊");
- $table->json("contact_info")->comment("聯絡資訊");
- $table->timestamps();
- $table->softDeletes();
- });
-
- Schema::enableForeignKeyConstraints();
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('projects');
- }
- };
|