D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
dateitor
/
www
/
database
/
migrations
/
Filename :
2023_10_04_084431_create_product_transactions_table.php
back
Copy
<?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::create('product_transactions', function (Blueprint $table) { $table->id(); $table->foreignId('product_id')->references('id')->on('products')->onDelete('cascade'); $table->string('name'); $table->string('email'); $table->double('amount'); $table->foreignId('currency_id')->nullable()->references('id')->on('currencies')->onDelete('cascade'); $table->string('phone')->nullable(); $table->integer('type'); $table->string('transaction_id'); $table->text('address'); $table->longText('meta'); $table->timestamps(); }); } /** * Reverse the migrations. */ public function down(): void { Schema::dropIfExists('product_transactions'); } };