Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F11546264
2023_03_05_100000_fs_relations_table.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1018 B
Referenced Files
None
Subscribers
None
2023_03_05_100000_fs_relations_table.php
View Options
<?php
use
Illuminate\Support\Facades\Schema
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Database\Migrations\Migration
;
return
new
class
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
():
void
{
Schema
::
create
(
'fs_relations'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'item_id'
,
36
);
$table
->
string
(
'related_id'
,
36
);
$table
->
foreign
(
'item_id'
)->
references
(
'id'
)->
on
(
'fs_items'
)
->
onDelete
(
'cascade'
);
$table
->
foreign
(
'related_id'
)->
references
(
'id'
)->
on
(
'fs_items'
)
->
onDelete
(
'cascade'
);
$table
->
unique
([
'item_id'
,
'related_id'
]);
}
);
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
():
void
{
Schema
::
dropIfExists
(
'fs_relations'
);
}
};
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 29, 1:33 AM (1 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1455360
Default Alt Text
2023_03_05_100000_fs_relations_table.php (1018 B)
Attached To
Mode
R2 kolab
Attached
Detach File
Event Timeline
Log In to Comment