Compare commits
2 Commits
374d05a2ca
...
1bb7d9000f
Author | SHA1 | Date |
---|---|---|
|
1bb7d9000f | |
|
24ec0430c1 |
|
@ -8,3 +8,5 @@ sudo mysql scoutrobot < db.tmp
|
|||
rm db.tmp
|
||||
|
||||
echo 'app(\App\Form\FormSettings::class)->fill(["registerUrl" => "http://stammsilva.test/anmeldung/{slug}/register", "clearCacheUrl" => "http://stammsilva.test/adrema/clear-cache"])->save();' | php artisan tinker
|
||||
|
||||
exit 0
|
||||
|
|
|
@ -39,6 +39,8 @@ class MailgatewayServiceProvider extends ServiceProvider
|
|||
MailmanType::class,
|
||||
]));
|
||||
|
||||
$this->loadMigrationsFrom(__DIR__ . '/database/migrations');
|
||||
|
||||
View::addNamespace('mailgateway', __DIR__ . '/Components');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Modules\Mailgateway\Types\MailmanType;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
foreach (DB::table('mailgateways')->get() as $gateway) {
|
||||
$type = json_decode($gateway->type);
|
||||
|
||||
$newType = ['type' => $type->cls, 'data' => $type->params];
|
||||
if (str_contains($type->cls, 'MailmanType')) {
|
||||
$newType['type'] = MailmanType::class;
|
||||
}
|
||||
DB::table('mailgateways')->where('id', $gateway->id)->update(['type' => json_encode($newType)]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue