add ability to generate a token to retrieve the config for a specific node
This commit is contained in:
parent
24bab6de17
commit
e1e159b7de
7 changed files with 147 additions and 0 deletions
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue