Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4686800
2019_09_17_102627_wallet_controllers.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
2019_09_17_102627_wallet_controllers.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment