| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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("sub_name")->comment("副標名稱");
- $table->json("summaries")->comment("專案概要");
- $table->json('img_url')->nullable()->comment('列表圖');
- $table->json("address")->comment("基本資料: 地址");
- $table->json("floor_plan")->comment("樓層規劃");
- $table->json("building_structure")->comment("建築結構");
- $table->json("design_unit")->comment("設計團隊");
- $table->json("contact_unit")->comment("物管單位");
- $table->json("contact_phone")->comment("物管電話");
- $table->json("inversment_phone")->comment("招商電話");
- $table->unsignedInteger('order')->default(0)->comment("排序");
- $table->timestamps();
- $table->softDeletes();
- });
-
- Schema::enableForeignKeyConstraints();
- }
-
- /**
- * Reverse the migrations.
- */
- public function down(): void
- {
- Schema::dropIfExists('projects');
- }
- };
|