INA-2 | Added auto_bill_tries property to the database

This commit is contained in:
Nikola Cirkovic 2022-05-17 01:22:03 +02:00
parent 431b2b84d4
commit b15018a73a
2 changed files with 39 additions and 6 deletions

View File

@ -91,6 +91,7 @@ class Invoice extends BaseModel
'auto_bill_enabled',
'uses_inclusive_taxes',
'vendor_id',
'auto_bill_tries'
];
protected $casts = [

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddAutoBillTriesToInvoicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoices', function (Blueprint $table) {
$table->smallInteger('auto_bill_tries')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoices', function (Blueprint $table) {
$table->dropColumn('auto_bill_tries');
});
}
}