journal-intime/database/migrations/2019_10_08_100005_update_users_encryption.php
cdesmidt 5467c7bdb7 🗃️ Ajoute l'option d'encryption
Par défaut à true
2019-10-08 17:15:06 +02:00

33 lines
670 B
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UpdateUsersEncryption extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->boolean('encrypt_messages')->default(true);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->removeColumn('encrypt_messages');
});
}
}