You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1012 B
PHTML

3 years ago
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateBudgetTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('budgets', function (Blueprint $table) {
$table->id();
$table->foreignId('category_id')->nullable();
$table->decimal('rollover', 12, 2)->default(0);
$table->decimal('budget', 12, 2)->default(0);
3 years ago
$table->decimal('total_used', 12, 2)->default(0);
$table->decimal('remain', 12, 2)->default(0);
3 years ago
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('budgets');
}
}