New migrations

This commit is contained in:
James Brooks 2016-10-30 17:45:27 +00:00
parent ffab454314
commit a2cded299d
2 changed files with 87 additions and 0 deletions

View File

@ -0,0 +1,44 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSchedulesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('schedules', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->longText('message')->nullable()->default(null);
$table->tinyInteger('status')->unsigned()->default(0);
$table->timestamp('scheduled_at');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('schedules');
}
}

View File

@ -0,0 +1,43 @@
<?php
/*
* This file is part of Cachet.
*
* (c) Alt Three Services Limited
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateScheduleComponentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('schedule_components', function (Blueprint $table) {
$table->increments('id');
$table->integer('schedule_id')->unsigned();
$table->integer('component_id')->unsigned();
$table->tinyInteger('component_status')->unsigned();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('schedule_components');
}
}