Convert encrypted columns to Text to handle long ciphertext

This commit is contained in:
Bubka 2020-12-04 15:16:23 +01:00
parent 10be720300
commit 505866f179

View File

@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterEncryptedColumnsToText extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if ('sqlite' !== config('database.default')) {
Schema::table('twofaccounts', function (Blueprint $table) {
$table->text('account')->change();
});
Schema::table('twofaccounts', function (Blueprint $table) {
$table->text('uri')->change();
});
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('twofaccounts', function (Blueprint $table) {
//
});
}
}