관리-도구
편집 파일: 2021_03_08_020247_create_expenses_table.php
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateExpensesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('expenses', function(Blueprint $table) { $table->engine = 'InnoDB'; $table->integer('id', true); $table->date('date'); $table->string('Ref', 192); $table->integer('user_id')->index('expense_user_id'); $table->integer('expense_category_id')->index('expense_category_id'); $table->integer('warehouse_id')->index('expense_warehouse_id'); $table->string('details', 192); $table->float('amount', 10, 0); $table->timestamps(6); $table->softDeletes(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('expenses'); } }