code/database/migrations/2017_08_05_103742_create_movement_types_table.php
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMovementTypesTable extends Migration
{
public function up()
{
Schema::create('movement_types', function (Blueprint $table) {
$table->string('id')->primary();
$table->timestamps();
$table->softDeletes();
$table->string('name');
$table->string('sender_type')->nullable();
$table->string('target_type')->nullable();
$table->boolean('allow_negative')->default(false);
$table->boolean('visibility')->default(true);
$table->boolean('system')->default(false);
$table->decimal('fixed_value', 6, 2)->nullable();
$table->text('default_notes')->nullable();
$table->text('function');
});
}
public function down()
{
Schema::drop('movement_types');
}
}