Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120837384
2022_11_04_120000_companion_app_uuids_oauth_client.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
2022_11_04_120000_companion_app_uuids_oauth_client.php
View Options
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CompanionAppUuidsOauthClient
extends
Migration
{
/**
* Run the migrations.
*/
public
function
up
()
{
Schema
::
dropIfExists
(
'companion_apps'
);
Schema
::
create
(
'companion_apps'
,
static
function
(
Blueprint
$table
)
{
$table
->
string
(
'id'
,
36
);
$table
->
string
(
'oauth_client_id'
,
36
)->
nullable
();
$table
->
bigInteger
(
'user_id'
);
// Seems to grow over time, no clear specification.
// Typically below 200 bytes, but some mention up to 350 bytes.
$table
->
string
(
'notification_token'
,
512
)->
nullable
();
// 16 byte for android, 36 for ios. May change over tyme
$table
->
string
(
'device_id'
,
64
)->
default
(
""
);
$table
->
string
(
'name'
)->
nullable
();
$table
->
boolean
(
'mfa_enabled'
)->
default
(
false
);
$table
->
timestamps
();
$table
->
primary
(
'id'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)->
on
(
'users'
)
->
onDelete
(
'cascade'
)
->
onUpdate
(
'cascade'
);
$table
->
foreign
(
'oauth_client_id'
)
->
references
(
'id'
)->
on
(
'oauth_clients'
)
->
onDelete
(
'set null'
);
});
}
/**
* Reverse the migrations.
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'companion_apps'
);
Schema
::
create
(
'companion_apps'
,
static
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
bigInteger
(
'user_id'
);
// Seems to grow over time, no clear specification.
// Typically below 200 bytes, but some mention up to 350 bytes.
$table
->
string
(
'notification_token'
,
512
)->
nullable
();
// 16 byte for android, 36 for ios. May change over tyme
$table
->
string
(
'device_id'
,
64
);
$table
->
string
(
'name'
)->
nullable
();
$table
->
boolean
(
'mfa_enabled'
);
$table
->
timestamps
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)->
on
(
'users'
)
->
onDelete
(
'cascade'
)
->
onUpdate
(
'cascade'
);
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 1:44 PM (3 d, 23 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18874936
Default Alt Text
2022_11_04_120000_companion_app_uuids_oauth_client.php (2 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline