Fix unability to store '-1' in the database properly

This commit is contained in:
Dane Everitt 2018-01-01 12:32:33 -06:00
parent 958c29cfbf
commit ffc8d4875f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 40 additions and 12 deletions

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AllowNegativeValuesForServerSwap extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('servers', function (Blueprint $table) {
$table->integer('swap')->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('servers', function (Blueprint $table) {
$table->unsignedInteger('swap')->change();
});
}
}