33 lines
1012 B
PHP
33 lines
1012 B
PHP
<?php
|
|
|
|
namespace App\OldDataMigrations;
|
|
|
|
class SystemConfigMigration extends BaseOldDataMigration
|
|
{
|
|
public function priority(): int
|
|
{
|
|
return 11;
|
|
}
|
|
|
|
public function migrate(): array
|
|
{
|
|
$results = [];
|
|
|
|
$results['system_configurations'] = $this->migrateTable('system_configurations');
|
|
$results['push_subscriptions'] = $this->migrateTable('push_subscriptions', function ($row) {
|
|
if (isset($row['user_id']) && $row['user_id'] !== null) {
|
|
$row['subscribable_type'] = 'App\\Models\\User';
|
|
$row['subscribable_id'] = $row['user_id'];
|
|
}
|
|
unset($row['user_id']);
|
|
|
|
return $row;
|
|
});
|
|
$results['homepage_configurations'] = $this->migrateTable('homepage_configurations');
|
|
$results['owner_verification_requests'] = $this->migrateTable('owner_verification_requests');
|
|
$results['notifications'] = $this->migrateTable('notifications');
|
|
|
|
return $results;
|
|
}
|
|
}
|