Drop explicit transaction from store_node_tokens_as_encrypted_value (#3280)
Migrations are executed in transactions anyway, and creating a savepoint can cause spurious failures on databases that don't support transactional DDL (like MySQL and MariaDB) when it attempts to commit a savepoint that was silently not created because there wasn't an active transaction after some DDL was executed. While a better solution might involve splitting this migration into several so each one is only DDL or only data manipulation, I don't think that can be done very easily while maintaining compatibility with existing deployments. Fixes #3229.
This commit is contained in:
parent
b0995f6458
commit
db64f54010
1 changed files with 10 additions and 12 deletions
|
@ -33,7 +33,6 @@ class StoreNodeTokensAsEncryptedValue extends Migration
|
||||||
$table->text('daemon_token')->change();
|
$table->text('daemon_token')->change();
|
||||||
});
|
});
|
||||||
|
|
||||||
DB::transaction(function () {
|
|
||||||
/** @var \Illuminate\Contracts\Encryption\Encrypter $encrypter */
|
/** @var \Illuminate\Contracts\Encryption\Encrypter $encrypter */
|
||||||
$encrypter = Container::getInstance()->make(Encrypter::class);
|
$encrypter = Container::getInstance()->make(Encrypter::class);
|
||||||
|
|
||||||
|
@ -45,7 +44,6 @@ class StoreNodeTokensAsEncryptedValue extends Migration
|
||||||
$datum->id,
|
$datum->id,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
Schema::table('nodes', function (Blueprint $table) {
|
Schema::table('nodes', function (Blueprint $table) {
|
||||||
$table->unique(['uuid']);
|
$table->unique(['uuid']);
|
||||||
|
|
Loading…
Reference in a new issue