2017-06-11 07:27:19 +08:00
|
|
|
<?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) {
|
2017-12-13 03:26:08 +08:00
|
|
|
$table->increments('id');
|
2017-07-11 07:54:51 +08:00
|
|
|
$table->string('code', 50);
|
|
|
|
$table->string('name', 50);
|
2017-12-13 03:26:08 +08:00
|
|
|
$table->unsignedDecimal('price', 19)->default(0.00);
|
|
|
|
$table->unsignedDecimal('cost', 19)->default(0.00);
|
|
|
|
$table->unsignedInteger('capacity')->default(0);
|
2017-06-11 07:27:19 +08:00
|
|
|
$table->string('notes')->nullable();
|
|
|
|
$table->boolean('active')->default(true);
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2017-12-13 01:49:35 +08:00
|
|
|
Schema::dropIfExists('fares');
|
2017-06-11 07:27:19 +08:00
|
|
|
}
|
|
|
|
}
|