ranjith-dev #48

Merged
jothi merged 2 commits from ranjith-dev into master 2025-12-23 05:50:34 +00:00
Showing only changes of commit 530078a4d8 - Show all commits

View File

@@ -0,0 +1,42 @@
<?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
{
$sql1 = <<<'SQL'
ALTER TABLE sticker_structure_details
ADD COLUMN plant_id BIGINT NOT NULL,
ADD CONSTRAINT sticker_structure_details_plant_id_fkey
FOREIGN KEY (plant_id) REFERENCES plants(id);
SQL;
DB::statement($sql1);
$sql2 = <<<'SQL'
ALTER TABLE sticker_structure_details
ADD COLUMN item_characteristic_id BIGINT NULL,
ADD CONSTRAINT sticker_structure_details_item_characteristic_id_fkey
FOREIGN KEY (item_characteristic_id) REFERENCES item_characteristics(id);
SQL;
DB::statement($sql2);
}
/**
* Reverse the migrations.
*/
public function down(): void
{
// Schema::table('sticker_structure_details', function (Blueprint $table) {
// //
// });
}
};