add ability to generate a token to retrieve the config for a specific node

This commit is contained in:
Jakob Schrettenbrunner 2017-01-07 18:10:11 +01:00
parent 24bab6de17
commit e1e159b7de
7 changed files with 147 additions and 0 deletions

View file

@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNodeConfigurationTokensTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('node_configuration_tokens', function (Blueprint $table) {
$table->increments('id');
$table->char('token', 32);
$table->timestamp('expires_at');
$table->integer('node')->unsigned();
$table->foreign('node')
->references('id')->on('nodes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('node_configuration_tokens');
}
}