Migration for min_amt on licenses

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2024-02-28 11:06:01 +00:00
parent 92b7c4b5ec
commit d0d29e03db

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddMinQtyToLicenses extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('licenses', function (Blueprint $table) {
$table->integer('min_amt')->nullable()->default(null);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('licenses', function (Blueprint $table) {
if (Schema::hasColumn('licenses', 'min_amt')) {
$table->dropColumn('min_amt');
}
});
}
}