D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
forge
/
mikyal.online
/
database
/
migrations
/
Filename :
2023_07_09_115921_create_stock_taxes_table.php
back
Copy
<?php use App\Enums\Status; 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::create('stock_taxes', function (Blueprint $table) { $table->id(); $table->foreignId('stock_id')->constrained(); $table->foreignId('product_id')->constrained(); $table->unsignedBigInteger('tax_id'); $table->string('name'); $table->string('code'); $table->decimal('tax_rate', 13, 6)->default(0); $table->decimal('tax_amount', 13, 6)->default(0); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('stocks'); } };