Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F9789339
2020_05_21_080131_create_transactions_table.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
2020_05_21_080131_create_transactions_table.php
View Options
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
// phpcs:ignore
class
CreateTransactionsTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'transactions'
,
function
(
Blueprint
$table
)
{
$table
->
string
(
'id'
,
36
)->
primary
();
$table
->
string
(
'user_email'
)->
nullable
();
$table
->
string
(
'object_id'
,
36
)->
index
();
$table
->
string
(
'object_type'
,
36
)->
index
();
$table
->
string
(
'type'
,
8
);
$table
->
integer
(
'amount'
)->
nullable
();
$table
->
string
(
'description'
)->
nullable
();
$table
->
string
(
'transaction_id'
,
36
)->
nullable
()->
index
();
$table
->
timestamp
(
'created_at'
)->
useCurrent
();
$table
->
timestamp
(
'updated_at'
)->
useCurrent
();
$table
->
index
([
'object_id'
,
'object_type'
]);
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'transactions'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 8:08 AM (15 h, 56 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1256326
Default Alt Text
2020_05_21_080131_create_transactions_table.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment