Document item table quantity column length changes..

This commit is contained in:
Cüneyt Şentürk
2022-08-29 17:17:38 +03:00
parent 568bf86695
commit 9f172b9c0b
3 changed files with 40 additions and 4 deletions

View File

@ -0,0 +1,36 @@
<?php
use Doctrine\DBAL\Types\FloatType;
use Doctrine\DBAL\Types\Type;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (! Type::hasType('double')) {
Type::addType('double', FloatType::class);
}
Schema::table('document_items', function(Blueprint $table) {
$table->double('quantity', 12, 2)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
};