refactor: replace custom CRM with Monica fork
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
Some checks failed
Build & Push Monica Image to Gitea Registry / build-and-push (push) Failing after 9s
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use LaravelWebauthn\Models\WebauthnKey;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
WebauthnKey::select(['id', 'credentialId'])->chunk(200, function ($keys) {
|
||||
foreach ($keys as $key) {
|
||||
$key->update(['credentialId' => $key->credentialId]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
WebauthnKey::select(['id', 'credentialId'])->chunk(200, function ($keys) {
|
||||
foreach ($keys as $key) {
|
||||
$key->setRawAttributes(['credentialId' => base64_encode($key->credentialId)]);
|
||||
$key->save();
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user