encrypt API keys

This commit is contained in:
Dane Everitt 2016-01-16 20:11:31 -05:00
parent 3e595ca856
commit 317698a84a
3 changed files with 45 additions and 3 deletions

View file

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ModifyApiKeys extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('api_keys', function (Blueprint $table) {
DB::statement('ALTER TABLE `api_keys` MODIFY `secret` TINYTEXT NOT NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('api_keys', function (Blueprint $table) {
DB::statement('ALTER TABLE `api_keys` MODIFY `secret` TINYTEXT NOT NULL');
});
}
}