Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F120836358
MigrateCommand.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
MigrateCommand.php
View Options
<?php
namespace
App\Console\Commands\Data
;
use
App\DataMigrator
;
use
Illuminate\Console\Command
;
/**
* Migrate user data from an external service to Kolab.
*
* Example usage:
*
* ```
* php artisan data:migrate \
* "ews://$user@$server?client_id=$client_id&client_secret=$client_secret&tenant_id=$tenant_id" \
* "dav://$dest_user:$dest_pass@$dest_server"
* ```
*
* Supported account types: ews, dav (davs), imap (tls, ssl, imaps)
*/
class
MigrateCommand
extends
Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected
$signature
=
'data:migrate
{src : Source account}
{dst : Destination account}
{--type= : Object type(s)}
{--sync : Execute migration synchronously}
{--force : Force existing queue removal}'
;
// {--export-only : Only export data}
// {--import-only : Only import previously exported data}';
/**
* The console command description.
*
* @var string
*/
protected
$description
=
'Migrate user data from an external service'
;
/**
* Execute the console command.
*
* @return mixed
*/
public
function
handle
()
{
$src
=
new
DataMigrator\Account
(
$this
->
argument
(
'src'
));
$dst
=
new
DataMigrator\Account
(
$this
->
argument
(
'dst'
));
$options
=
[
'type'
=>
$this
->
option
(
'type'
),
'force'
=>
$this
->
option
(
'force'
),
'sync'
=>
$this
->
option
(
'sync'
),
'stdout'
=>
true
,
];
$migrator
=
new
DataMigrator\Engine
();
$migrator
->
migrate
(
$src
,
$dst
,
$options
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Apr 24, 1:29 PM (3 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18851626
Default Alt Text
MigrateCommand.php (1 KB)
Attached To
Mode
rK kolab
Attached
Detach File
Event Timeline