phpvms/database/migrations/2017_06_10_040335_create_fares_table.php

39 lines
921 B
PHP
Raw Normal View History

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateFaresTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('fares', function (Blueprint $table) {
$table->increments('id');
$table->string('code', 50);
$table->string('name', 50);
$table->unsignedDecimal('price', 19)->default(0.00);
$table->unsignedDecimal('cost', 19)->default(0.00);
$table->unsignedInteger('capacity')->default(0);
$table->string('notes')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('fares');
}
}