Use cache helpers rather than database to handle configuration tokens and downloads.
This commit is contained in:
parent
2330c25a8c
commit
605c91a9af
11 changed files with 95 additions and 146 deletions
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DeleteDownloadTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('downloads');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('downloads', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('token', 36)->unique();
|
||||
$table->char('server', 36);
|
||||
$table->text('path');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class DeleteNodeConfigurationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::dropIfExists('node_configuration_tokens');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::create('node_configuration_tokens', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->char('token', 32);
|
||||
$table->unsignedInteger('node_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::table('node_configuration_tokens', function (Blueprint $table) {
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue