Xu ly giao dien San Pham
This commit is contained in:
@@ -5,7 +5,7 @@ use Illuminate\Support\Facades\Schema;
|
||||
return new class extends Migration {
|
||||
public function up(): void {
|
||||
Schema::create('contract_customers', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid('id')->primary();
|
||||
$table->foreignUuid('contract_id')->constrained('contracts')->cascadeOnDelete();
|
||||
$table->foreignUuid('customer_id')->constrained('customers')->cascadeOnDelete();
|
||||
$table->string('role')->default('CHỦ SH 1'); // Đồng sở hữu
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void {
|
||||
Schema::table('projects', function (Blueprint $table) {
|
||||
$table->string('type')->nullable(); // Thêm cột loại hình dự án
|
||||
$table->foreignUuid('payment_template_id')->nullable()->constrained('payment_templates')->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void {
|
||||
Schema::table('projects', function (Blueprint $table) {
|
||||
$table->dropForeign(['payment_template_id']);
|
||||
$table->dropColumn(['payment_template_id', 'type']);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user