Skip to content

Commit 94bfd24

Browse files
committed
Add allocation limits for nodes.
Percentage based, if null no limit is set (allows unlimited servers)
1 parent 2abcb02 commit 94bfd24

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
3+
use Illuminate\Database\Schema\Blueprint;
4+
use Illuminate\Database\Migrations\Migration;
5+
6+
class AddNodeResourceLimits extends Migration
7+
{
8+
/**
9+
* Run the migrations.
10+
*
11+
* @return void
12+
*/
13+
public function up()
14+
{
15+
Schema::table('nodes', function (Blueprint $table) {
16+
$table->mediumInteger('memory_overallocate')->after('memory')->unsigned()->nullable();
17+
$table->mediumInteger('disk_overallocate')->after('disk')->unsigned()->nullable();
18+
});
19+
}
20+
21+
/**
22+
* Reverse the migrations.
23+
*
24+
* @return void
25+
*/
26+
public function down()
27+
{
28+
Schema::table('nodes', function (Blueprint $table) {
29+
$table->dropColumn('memory_overallocate');
30+
$table->dropColumn('disk_overallocate');
31+
});
32+
}
33+
}

0 commit comments

Comments
 (0)