From 358c54b0f0c5a864e36df65d2173b795f06cbb16 Mon Sep 17 00:00:00 2001 From: "iVampireSP.com" Date: Sun, 20 Nov 2022 22:26:37 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20module=20id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...22_11_20_222505_add_module_id_to_tasks.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 database/migrations/2022_11_20_222505_add_module_id_to_tasks.php diff --git a/database/migrations/2022_11_20_222505_add_module_id_to_tasks.php b/database/migrations/2022_11_20_222505_add_module_id_to_tasks.php new file mode 100644 index 0000000..a845a56 --- /dev/null +++ b/database/migrations/2022_11_20_222505_add_module_id_to_tasks.php @@ -0,0 +1,35 @@ +string('module_id')->nullable()->after('host_id')->index(); + $table->foreign('module_id')->references('id')->on('modules')->onDelete('cascade'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('tasks', function (Blueprint $table) { + // + }); + } +};