New migrations (also for export).

This commit is contained in:
James Cole
2016-02-04 17:13:58 +01:00
parent 78f8b1454d
commit 3bb107e192
3 changed files with 50 additions and 82 deletions

View File

@@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Class ChangesForV380
*/
class ChangesForV380 extends Migration
{
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
// new table "rule_groups"
Schema::create(
'export_jobs', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('user_id')->unsigned();
$table->string('key', 12)->unique();
$table->string('status', 45);
// connect rule groups to users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
}
);
}
}