<?php

use Server\Database\Migrations\ParentMigration;
use Illuminate\Database\Schema\Blueprint;

class CreatePausesTable extends ParentMigration
{

    public function up()
    {
        $this->schema->create('pauses', function (Blueprint $table) {
            $table->increments('id');

            $table->integer('contract_id');

            $table->float('speed_per_day', 11, 8);

            $table->integer('start_timestamp');

            $table->integer('end_timestamp')->nullable();

            $table->float('seconds_past')->nullable();

            $table->float('minutes_past')->nullable();

            $table->float('hours_past')->nullable();

            $table->float('days_past')->nullable();

            $table->float('missed', 11, 8)->default(0);

            $table->timestamps();
        });
    }

    public function down()
    {
        $this->schema->drop('pauses');
    }
}
