Make scheduled statuses work under PgSQL and existing installations

This commit is contained in:
James Brooks
2015-02-28 21:50:50 +00:00
parent 92c43318a8
commit 6bf5ad2328
4 changed files with 42 additions and 7 deletions
@@ -20,7 +20,6 @@ class CreateIncidentsTable extends Migration
$table->integer('status');
$table->longText('message');
$table->integer('user_id');
$table->timestamp('scheduled_at');
$table->timestamps();
$table->softDeletes();
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\Schema;
class UpdateIncidentsAddScheduledAt extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('incidents', function(Blueprint $table)
{
$table->timestamp('scheduled_at')->after('user_id')->nullable()->default(null);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('incidents', function(Blueprint $table)
{
$table->dropColumn('scheduled_at');
});
}
}