phpvms/database/migrations/2017_06_10_040335_create_fares_table.php
2017-06-24 11:09:27 -05:00

39 lines
897 B
PHP

<?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');
$table->string('name');
$table->decimal('price', 19, 2)->default(0.0);
$table->decimal('cost', 19, 2)->default(0.0);
$table->integer('capacity')->default(0)->unsigned();
$table->string('notes')->nullable();
$table->boolean('active')->default(true);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('fares');
}
}