Document item table quantity column length changes..
This commit is contained in:
36
database/migrations/2022_08_29_000000_core_v307.php
Normal file
36
database/migrations/2022_08_29_000000_core_v307.php
Normal 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()
|
||||
{
|
||||
//
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user