diff --git a/app/Models/Server.php b/app/Models/Server.php index 5d42cf86b..8dc675726 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -63,7 +63,7 @@ class Server extends Model implements CleansAttributes, ValidableContract 'image' => 'required', 'startup' => 'required', 'database_limit' => 'present', - 'allocation_limit' => 'present', + 'allocation_limit' => 'sometimes', ]; /** diff --git a/database/migrations/2019_03_02_142328_set_allocation_limit_default_null.php b/database/migrations/2019_03_02_142328_set_allocation_limit_default_null.php new file mode 100644 index 000000000..d91ce6372 --- /dev/null +++ b/database/migrations/2019_03_02_142328_set_allocation_limit_default_null.php @@ -0,0 +1,32 @@ +unsignedInteger('allocation_limit')->nullable()->default(null)->change(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('servers', function (Blueprint $table) { + $table->unsignedInteger('allocation_limit')->nullable()->default(0)->change(); + }); + } +}