Parcourir la source

更改tasks表的asset_id和requirement_group_id数据类型

kely il y a 11 mois
Parent
commit
43bd6dc4ee

+ 31 - 0
database/migrations/2024_03_29_095824_change_asset_id_and_reuqirement_group_id_type_to_tasks.php

@@ -0,0 +1,31 @@
+<?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::table('tasks', function (Blueprint $table) {
+            $table->integer('asset_id')->nullable()->change();
+            $table->integer('requirement_group_id')->nullable()->change();
+        });
+    }
+
+    /**
+     * Reverse the migrations.
+     */
+    public function down(): void
+    {
+        Schema::table('tasks', function (Blueprint $table) {
+            //
+            $table->string('asset_id')->nullable()->change();
+            $table->string('requirement_group_id')->nullable()->change();
+        });
+    }
+};