Page MenuHomePhorge

2019_09_17_102627_wallet_controllers.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

2019_09_17_102627_wallet_controllers.php

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class WalletControllers extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create(
'user_accounts',
function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('user_id');
$table->string('wallet_id', 36);
$table->timestamps();
}
);
Schema::table(
'user_accounts',
function (Blueprint $table) {
$table->unique(['user_id', 'wallet_id']);
$table->foreign('user_id')
->references('id')->on('users')
->onDelete('cascade');
$table->foreign('wallet_id')
->references('id')->on('wallets')
->onDelete('cascade');
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('user_accounts');
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, May 1, 3:41 PM (3 h, 27 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
661879
Default Alt Text
2019_09_17_102627_wallet_controllers.php (1 KB)

Event Timeline