Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2397662
2019_12_10_100355_create_package_skus_table.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
2019_12_10_100355_create_package_skus_table.php
View Options
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
// phpcs:ignore
class
CreatePackageSkusTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'package_skus'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'package_id'
,
36
);
$table
->
string
(
'sku_id'
,
36
);
$table
->
integer
(
'qty'
)->
default
(
1
);
$table
->
integer
(
'cost'
)->
default
(
0
)->
nullable
();
$table
->
foreign
(
'package_id'
)->
references
(
'id'
)->
on
(
'packages'
)
->
onDelete
(
'cascade'
)->
onUpdate
(
'cascade'
);
$table
->
foreign
(
'sku_id'
)->
references
(
'id'
)->
on
(
'skus'
)
->
onDelete
(
'cascade'
)->
onUpdate
(
'cascade'
);
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'package_skus'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Nov 3, 2:43 PM (1 d, 2 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
358381
Default Alt Text
2019_12_10_100355_create_package_skus_table.php (1 KB)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment