First round of changes to API to support simpler permissions.
This commit is contained in:
parent
0e24c669c4
commit
a31e5875dc
21 changed files with 403 additions and 169 deletions
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddApiKeyPermissionColumns extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('api_keys', function (Blueprint $table) {
|
||||
$table->unsignedTinyInteger('r_servers')->default(0);
|
||||
$table->unsignedTinyInteger('r_nodes')->default(0);
|
||||
$table->unsignedTinyInteger('r_allocations')->default(0);
|
||||
$table->unsignedTinyInteger('r_users')->default(0);
|
||||
$table->unsignedTinyInteger('r_locations')->default(0);
|
||||
$table->unsignedTinyInteger('r_nests')->default(0);
|
||||
$table->unsignedTinyInteger('r_eggs')->default(0);
|
||||
$table->unsignedTinyInteger('r_databases')->default(0);
|
||||
$table->unsignedTinyInteger('r_packs')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('api_keys', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'r_servers',
|
||||
'r_nodes',
|
||||
'r_allocations',
|
||||
'r_users',
|
||||
'r_locations',
|
||||
'r_nests',
|
||||
'r_eggs',
|
||||
'r_databases',
|
||||
'r_packs',
|
||||
]);
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue