update 1.0.7
This commit is contained in:
@@ -18,6 +18,8 @@ class CreateTicketThreadTable extends Migration
|
||||
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
|
||||
$table->string('poster');
|
||||
$table->integer('source')->unsigned()->nullable()->index('source');
|
||||
$table->integer('reply_rating');
|
||||
$table->integer('rating_count');
|
||||
$table->boolean('is_internal');
|
||||
$table->string('title');
|
||||
$table->text('body', 65535);
|
||||
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateNotificationsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notifications', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('model_id');
|
||||
$table->integer('userid_created');
|
||||
$table->integer('type_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('notifications');
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateNotificationTypesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('notification_types', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('message');
|
||||
$table->string('type');
|
||||
$table->string('icon_class');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('notification_types');
|
||||
}
|
||||
}
|
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateUserNotificationTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('user_notification', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('notification_id');
|
||||
$table->integer('user_id');
|
||||
$table->integer('is_read');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('user_notification');
|
||||
}
|
||||
}
|
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateWorkflowNameTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('workflow_name', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->integer('status');
|
||||
$table->integer('order');
|
||||
$table->string('target');
|
||||
$table->text('internal_note');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('workflow_name');
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateWorkflowRuleTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('workflow_rules', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('workflow_id')->unsigned();
|
||||
$table->string('matching_criteria');
|
||||
$table->string('matching_scenario');
|
||||
$table->string('matching_relation');
|
||||
$table->text('matching_value');
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::table('workflow_rules', function (Blueprint $table) {
|
||||
$table->foreign('workflow_id', 'workflow_rules_1')->references('id')->on('workflow_name')->onUpdate('NO ACTION')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('workflow_rules', function (Blueprint $table) {
|
||||
$table->dropForeign('workflow_rules_1');
|
||||
});
|
||||
Schema::drop('workflow_rules');
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateWorkflowActionTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('workflow_action', function (Blueprint $table) {
|
||||
$table->increments('id');
|
||||
$table->integer('workflow_id')->unsigned();
|
||||
$table->string('condition');
|
||||
$table->string('action');
|
||||
$table->timestamps();
|
||||
});
|
||||
Schema::table('workflow_action', function (Blueprint $table) {
|
||||
$table->foreign('workflow_id', 'workflow_action_1')->references('id')->on('workflow_name')->onUpdate('NO ACTION')->onDelete('RESTRICT');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('workflow_action');
|
||||
Schema::table('workflow_action', function (Blueprint $table) {
|
||||
$table->dropForeign('workflow_action_idfk_1');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user