Applied fixes from StyleCI

This commit is contained in:
Sujit Prasad
2016-02-19 02:20:12 -05:00
committed by StyleCI Bot
parent be5df5334f
commit d637c2b23f
439 changed files with 19063 additions and 19210 deletions

View File

@@ -3,34 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBanlistTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('banlist', function(Blueprint $table)
{
$table->increments('id');
$table->boolean('ban_status');
$table->string('email_address');
$table->string('internal_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('banlist');
}
class CreateBanlistTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('banlist', function (Blueprint $table) {
$table->increments('id');
$table->boolean('ban_status');
$table->string('email_address');
$table->string('internal_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('banlist');
}
}

View File

@@ -3,34 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCannedResponseTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('canned_response', function(Blueprint $table)
{
$table->increments('id');
$table->integer('user_id')->unsigned()->index('user_id');
$table->string('title');
$table->text('message', 65535);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('canned_response');
}
class CreateCannedResponseTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('canned_response', function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id')->unsigned()->index('user_id');
$table->string('title');
$table->text('message', 65535);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('canned_response');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCustomFormFieldsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('custom_form_fields', function(Blueprint $table)
{
$table->increments('id');
$table->integer('forms_id');
$table->string('label');
$table->string('name');
$table->string('type');
$table->string('value');
$table->string('required');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('custom_form_fields');
}
class CreateCustomFormFieldsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('custom_form_fields', function (Blueprint $table) {
$table->increments('id');
$table->integer('forms_id');
$table->string('label');
$table->string('name');
$table->string('type');
$table->string('value');
$table->string('required');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('custom_form_fields');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCustomFormsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('custom_forms', function(Blueprint $table)
{
$table->increments('id');
$table->string('formname');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('custom_forms');
}
class CreateCustomFormsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('custom_forms', function (Blueprint $table) {
$table->increments('id');
$table->string('formname');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('custom_forms');
}
}

View File

@@ -3,31 +3,28 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateDateFormatTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('date_format', function(Blueprint $table)
{
$table->increments('id');
$table->string('format');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('date_format');
}
class CreateDateFormatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('date_format', function (Blueprint $table) {
$table->increments('id');
$table->string('format');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('date_format');
}
}

View File

@@ -3,31 +3,28 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateDateTimeFormatTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('date_time_format', function(Blueprint $table)
{
$table->increments('id');
$table->string('format');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('date_time_format');
}
class CreateDateTimeFormatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('date_time_format', function (Blueprint $table) {
$table->increments('id');
$table->string('format');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('date_time_format');
}
}

View File

@@ -3,44 +3,41 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateDepartmentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('department', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('type');
$table->integer('sla')->unsigned()->nullable()->index('sla');
$table->integer('manager')->unsigned()->nullable()->index('manager_2');
$table->string('ticket_assignment');
$table->string('outgoing_email');
$table->string('template_set');
$table->string('auto_ticket_response');
$table->string('auto_message_response');
$table->string('auto_response_email');
$table->string('recipient');
$table->string('group_access');
$table->string('department_sign');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('department');
}
class CreateDepartmentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('department', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('type');
$table->integer('sla')->unsigned()->nullable()->index('sla');
$table->integer('manager')->unsigned()->nullable()->index('manager_2');
$table->string('ticket_assignment');
$table->string('outgoing_email');
$table->string('template_set');
$table->string('auto_ticket_response');
$table->string('auto_message_response');
$table->string('auto_response_email');
$table->string('recipient');
$table->string('group_access');
$table->string('department_sign');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('department');
}
}

View File

@@ -3,57 +3,54 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateEmailsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('emails', function(Blueprint $table)
{
$table->increments('id');
$table->string('email_address');
$table->string('email_name');
$table->integer('department')->unsigned()->nullable();
$table->integer('priority')->unsigned()->nullable()->index('priority');
$table->integer('help_topic')->unsigned()->nullable()->index('help_topic');
$table->string('user_name');
$table->string('password');
$table->string('fetching_host');
$table->string('fetching_port');
$table->string('mailbox_protocol');
$table->string('imap_config');
$table->string('folder');
$table->string('sending_host');
$table->string('sending_port');
$table->string('sending_encryption');
$table->string('internal_notes');
$table->boolean('auto_response');
$table->boolean('fetching_status');
$table->boolean('move_to_folder');
$table->boolean('delete_email');
$table->boolean('do_nothing');
$table->boolean('sending_status');
$table->boolean('authentication');
$table->boolean('header_spoofing');
$table->timestamps();
$table->index(['department','priority','help_topic'], 'department');
$table->index(['department','priority','help_topic'], 'department_2');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('emails');
}
class CreateEmailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('emails', function (Blueprint $table) {
$table->increments('id');
$table->string('email_address');
$table->string('email_name');
$table->integer('department')->unsigned()->nullable();
$table->integer('priority')->unsigned()->nullable()->index('priority');
$table->integer('help_topic')->unsigned()->nullable()->index('help_topic');
$table->string('user_name');
$table->string('password');
$table->string('fetching_host');
$table->string('fetching_port');
$table->string('mailbox_protocol');
$table->string('imap_config');
$table->string('folder');
$table->string('sending_host');
$table->string('sending_port');
$table->string('sending_encryption');
$table->string('internal_notes');
$table->boolean('auto_response');
$table->boolean('fetching_status');
$table->boolean('move_to_folder');
$table->boolean('delete_email');
$table->boolean('do_nothing');
$table->boolean('sending_status');
$table->boolean('authentication');
$table->boolean('header_spoofing');
$table->timestamps();
$table->index(['department', 'priority', 'help_topic'], 'department');
$table->index(['department', 'priority', 'help_topic'], 'department_2');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('emails');
}
}

View File

@@ -3,33 +3,30 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGroupAssignDepartmentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('group_assign_department', function(Blueprint $table)
{
$table->increments('id');
$table->integer('group_id')->unsigned()->index('group_id');
$table->integer('department_id')->unsigned()->index('department_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('group_assign_department');
}
class CreateGroupAssignDepartmentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('group_assign_department', function (Blueprint $table) {
$table->increments('id');
$table->integer('group_id')->unsigned()->index('group_id');
$table->integer('department_id')->unsigned()->index('department_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('group_assign_department');
}
}

View File

@@ -3,46 +3,43 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGroupsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('groups', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->boolean('group_status');
$table->boolean('can_create_ticket');
$table->boolean('can_edit_ticket');
$table->boolean('can_post_ticket');
$table->boolean('can_close_ticket');
$table->boolean('can_assign_ticket');
$table->boolean('can_transfer_ticket');
$table->boolean('can_delete_ticket');
$table->boolean('can_ban_email');
$table->boolean('can_manage_canned');
$table->boolean('can_manage_faq');
$table->boolean('can_view_agent_stats');
$table->boolean('department_access');
$table->string('admin_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('groups');
}
class CreateGroupsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('groups', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->boolean('group_status');
$table->boolean('can_create_ticket');
$table->boolean('can_edit_ticket');
$table->boolean('can_post_ticket');
$table->boolean('can_close_ticket');
$table->boolean('can_assign_ticket');
$table->boolean('can_transfer_ticket');
$table->boolean('can_delete_ticket');
$table->boolean('can_ban_email');
$table->boolean('can_manage_canned');
$table->boolean('can_manage_faq');
$table->boolean('can_view_agent_stats');
$table->boolean('department_access');
$table->string('admin_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('groups');
}
}

View File

@@ -3,45 +3,42 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateHelpTopicTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('help_topic', function(Blueprint $table)
{
$table->increments('id');
$table->string('topic');
$table->string('parent_topic');
$table->integer('custom_form')->unsigned()->nullable()->index('custom_form');
$table->integer('department')->unsigned()->nullable()->index('department');
$table->integer('ticket_status')->unsigned()->nullable()->index('ticket_status');
$table->integer('priority')->unsigned()->nullable()->index('priority');
$table->integer('sla_plan')->unsigned()->nullable()->index('sla_plan');
$table->string('thank_page');
$table->string('ticket_num_format');
$table->string('internal_notes');
$table->boolean('status');
$table->boolean('type');
$table->integer('auto_assign')->unsigned()->nullable()->index('auto_assign_2');
$table->boolean('auto_response');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('help_topic');
}
class CreateHelpTopicTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('help_topic', function (Blueprint $table) {
$table->increments('id');
$table->string('topic');
$table->string('parent_topic');
$table->integer('custom_form')->unsigned()->nullable()->index('custom_form');
$table->integer('department')->unsigned()->nullable()->index('department');
$table->integer('ticket_status')->unsigned()->nullable()->index('ticket_status');
$table->integer('priority')->unsigned()->nullable()->index('priority');
$table->integer('sla_plan')->unsigned()->nullable()->index('sla_plan');
$table->string('thank_page');
$table->string('ticket_num_format');
$table->string('internal_notes');
$table->boolean('status');
$table->boolean('type');
$table->integer('auto_assign')->unsigned()->nullable()->index('auto_assign_2');
$table->boolean('auto_response');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('help_topic');
}
}

View File

@@ -3,33 +3,30 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateKbArticleRelationshipTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_article_relationship', function(Blueprint $table)
{
$table->increments('id');
$table->integer('article_id')->unsigned()->index('article_relationship_article_id_foreign');
$table->integer('category_id')->unsigned()->index('article_relationship_category_id_foreign');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_article_relationship');
}
class CreateKbArticleRelationshipTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_article_relationship', function (Blueprint $table) {
$table->increments('id');
$table->integer('article_id')->unsigned()->index('article_relationship_article_id_foreign');
$table->integer('category_id')->unsigned()->index('article_relationship_category_id_foreign');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_article_relationship');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateKbArticleTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_article', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('slug');
$table->text('description', 65535);
$table->boolean('status');
$table->boolean('type');
$table->dateTime('publish_time')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_article');
}
class CreateKbArticleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_article', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('slug');
$table->text('description', 65535);
$table->boolean('status');
$table->boolean('type');
$table->dateTime('publish_time')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_article');
}
}

View File

@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateKbCategoryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_category', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('slug');
$table->text('description', 65535);
$table->boolean('status');
$table->integer('parent');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_category');
}
class CreateKbCategoryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_category', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('slug');
$table->text('description', 65535);
$table->boolean('status');
$table->integer('parent');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_category');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateKbCommentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_comment', function(Blueprint $table)
{
$table->increments('id');
$table->integer('article_id')->unsigned()->index('comment_article_id_foreign');
$table->string('name');
$table->string('email');
$table->string('website');
$table->string('comment');
$table->boolean('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_comment');
}
class CreateKbCommentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_comment', function (Blueprint $table) {
$table->increments('id');
$table->integer('article_id')->unsigned()->index('comment_article_id_foreign');
$table->string('name');
$table->string('email');
$table->string('website');
$table->string('comment');
$table->boolean('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_comment');
}
}

View File

@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateKbPagesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_pages', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->boolean('status');
$table->boolean('visibility');
$table->string('slug');
$table->text('description', 65535);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_pages');
}
class CreateKbPagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_pages', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->boolean('status');
$table->boolean('visibility');
$table->string('slug');
$table->text('description', 65535);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_pages');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateKbSettingsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_settings', function(Blueprint $table)
{
$table->increments('id');
$table->integer('pagination');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_settings');
}
class CreateKbSettingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('kb_settings', function (Blueprint $table) {
$table->increments('id');
$table->integer('pagination');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_settings');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateLanguagesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('languages', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('locale');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('languages');
}
class CreateLanguagesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('languages', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('locale');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('languages');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateLogNotificationTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_notification', function(Blueprint $table)
{
$table->increments('id');
$table->string('log');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('log_notification');
}
class CreateLogNotificationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('log_notification', function (Blueprint $table) {
$table->increments('id');
$table->string('log');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('log_notification');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateMailboxProtocolTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mailbox_protocol', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('value', 50)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('mailbox_protocol');
}
class CreateMailboxProtocolTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mailbox_protocol', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('value', 50)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('mailbox_protocol');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateOrganizationTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('organization', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('phone');
$table->string('website');
$table->string('address');
$table->integer('head')->unsigned()->nullable()->index('head');
$table->string('internal_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('organization');
}
class CreateOrganizationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('organization', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('phone');
$table->string('website');
$table->string('address');
$table->integer('head')->unsigned()->nullable()->index('head');
$table->string('internal_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('organization');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePasswordResetsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function(Blueprint $table)
{
$table->string('email')->index();
$table->string('token')->index();
$table->dateTime('created_at')->default('0000-00-00 00:00:00');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token')->index();
$table->dateTime('created_at')->default('0000-00-00 00:00:00');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}

View File

@@ -3,34 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePluginsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('plugins', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('path');
$table->integer('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('plugins');
}
class CreatePluginsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('plugins', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('path');
$table->integer('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('plugins');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSendMailTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('send_mail', function(Blueprint $table)
{
$table->increments('id');
$table->string('driver');
$table->string('host');
$table->string('port');
$table->string('encryption');
$table->string('name');
$table->string('email');
$table->string('password');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('send_mail');
}
class CreateSendMailTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('send_mail', function (Blueprint $table) {
$table->increments('id');
$table->string('driver');
$table->string('host');
$table->string('port');
$table->string('encryption');
$table->string('name');
$table->string('email');
$table->string('password');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('send_mail');
}
}

View File

@@ -3,60 +3,57 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsAlertNoticeTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_alert_notice', function(Blueprint $table)
{
$table->increments('id');
$table->boolean('ticket_status');
$table->boolean('ticket_admin_email');
$table->boolean('ticket_department_manager');
$table->boolean('ticket_department_member');
$table->boolean('ticket_organization_accmanager');
$table->boolean('message_status');
$table->boolean('message_last_responder');
$table->boolean('message_assigned_agent');
$table->boolean('message_department_manager');
$table->boolean('message_organization_accmanager');
$table->boolean('internal_status');
$table->boolean('internal_last_responder');
$table->boolean('internal_assigned_agent');
$table->boolean('internal_department_manager');
$table->boolean('assignment_status');
$table->boolean('assignment_assigned_agent');
$table->boolean('assignment_team_leader');
$table->boolean('assignment_team_member');
$table->boolean('transfer_status');
$table->boolean('transfer_assigned_agent');
$table->boolean('transfer_department_manager');
$table->boolean('transfer_department_member');
$table->boolean('overdue_status');
$table->boolean('overdue_assigned_agent');
$table->boolean('overdue_department_manager');
$table->boolean('overdue_department_member');
$table->boolean('system_error');
$table->boolean('sql_error');
$table->boolean('excessive_failure');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_alert_notice');
}
class CreateSettingsAlertNoticeTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_alert_notice', function (Blueprint $table) {
$table->increments('id');
$table->boolean('ticket_status');
$table->boolean('ticket_admin_email');
$table->boolean('ticket_department_manager');
$table->boolean('ticket_department_member');
$table->boolean('ticket_organization_accmanager');
$table->boolean('message_status');
$table->boolean('message_last_responder');
$table->boolean('message_assigned_agent');
$table->boolean('message_department_manager');
$table->boolean('message_organization_accmanager');
$table->boolean('internal_status');
$table->boolean('internal_last_responder');
$table->boolean('internal_assigned_agent');
$table->boolean('internal_department_manager');
$table->boolean('assignment_status');
$table->boolean('assignment_assigned_agent');
$table->boolean('assignment_team_leader');
$table->boolean('assignment_team_member');
$table->boolean('transfer_status');
$table->boolean('transfer_assigned_agent');
$table->boolean('transfer_department_manager');
$table->boolean('transfer_department_member');
$table->boolean('overdue_status');
$table->boolean('overdue_assigned_agent');
$table->boolean('overdue_department_manager');
$table->boolean('overdue_department_member');
$table->boolean('system_error');
$table->boolean('sql_error');
$table->boolean('excessive_failure');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_alert_notice');
}
}

View File

@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsAutoResponseTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_auto_response', function(Blueprint $table)
{
$table->increments('id');
$table->boolean('new_ticket');
$table->boolean('agent_new_ticket');
$table->boolean('submitter');
$table->boolean('participants');
$table->boolean('overlimit');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_auto_response');
}
class CreateSettingsAutoResponseTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_auto_response', function (Blueprint $table) {
$table->increments('id');
$table->boolean('new_ticket');
$table->boolean('agent_new_ticket');
$table->boolean('submitter');
$table->boolean('participants');
$table->boolean('overlimit');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_auto_response');
}
}

View File

@@ -3,40 +3,37 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsCompanyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_company', function(Blueprint $table)
{
$table->increments('id');
$table->string('company_name');
$table->string('website');
$table->string('phone');
$table->string('address');
$table->string('landing_page');
$table->string('offline_page');
$table->string('thank_page');
$table->string('logo');
$table->string('use_logo');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_company');
}
class CreateSettingsCompanyTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_company', function (Blueprint $table) {
$table->increments('id');
$table->string('company_name');
$table->string('website');
$table->string('phone');
$table->string('address');
$table->string('landing_page');
$table->string('offline_page');
$table->string('thank_page');
$table->string('logo');
$table->string('use_logo');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_company');
}
}

View File

@@ -3,43 +3,40 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsEmailTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_email', function(Blueprint $table)
{
$table->increments('id');
$table->string('template');
$table->string('sys_email')->nullable();
$table->string('alert_email');
$table->string('admin_email');
$table->string('mta');
$table->boolean('email_fetching');
$table->boolean('notification_cron');
$table->boolean('strip');
$table->boolean('separator');
$table->boolean('all_emails');
$table->boolean('email_collaborator');
$table->boolean('attachment');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_email');
}
class CreateSettingsEmailTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_email', function (Blueprint $table) {
$table->increments('id');
$table->string('template');
$table->string('sys_email')->nullable();
$table->string('alert_email');
$table->string('admin_email');
$table->string('mta');
$table->boolean('email_fetching');
$table->boolean('notification_cron');
$table->boolean('strip');
$table->boolean('separator');
$table->boolean('all_emails');
$table->boolean('email_collaborator');
$table->boolean('attachment');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_email');
}
}

View File

@@ -3,35 +3,32 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsRatingsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_ratings', function(Blueprint $table)
{
$table->increments('id');
$table->string('rating_name');
$table->integer('publish');
$table->integer('modify');
$table->string('slug')->unique();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_ratings');
}
class CreateSettingsRatingsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_ratings', function (Blueprint $table) {
$table->increments('id');
$table->string('rating_name');
$table->integer('publish');
$table->integer('modify');
$table->string('slug')->unique();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_ratings');
}
}

View File

@@ -3,47 +3,44 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsSystemTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_system', function(Blueprint $table)
{
$table->increments('id');
$table->boolean('status');
$table->string('url');
$table->string('name');
$table->string('department');
$table->string('page_size');
$table->string('log_level');
$table->string('purge_log');
$table->integer('api_enable');
$table->string('api_key');
$table->string('name_format');
$table->integer('time_farmat')->unsigned()->nullable()->index('time_farmat');
$table->integer('date_format')->unsigned()->nullable()->index('date_format');
$table->integer('date_time_format')->unsigned()->nullable()->index('date_time_format');
$table->string('day_date_time');
$table->integer('time_zone')->unsigned()->nullable()->index('time_zone');
$table->string('content');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_system');
}
class CreateSettingsSystemTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_system', function (Blueprint $table) {
$table->increments('id');
$table->boolean('status');
$table->string('url');
$table->string('name');
$table->string('department');
$table->string('page_size');
$table->string('log_level');
$table->string('purge_log');
$table->integer('api_enable');
$table->string('api_key');
$table->string('name_format');
$table->integer('time_farmat')->unsigned()->nullable()->index('time_farmat');
$table->integer('date_format')->unsigned()->nullable()->index('date_format');
$table->integer('date_time_format')->unsigned()->nullable()->index('date_time_format');
$table->string('day_date_time');
$table->integer('time_zone')->unsigned()->nullable()->index('time_zone');
$table->string('content');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_system');
}
}

View File

@@ -3,47 +3,44 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTicketTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_ticket', function(Blueprint $table)
{
$table->increments('id');
$table->string('num_format');
$table->string('num_sequence');
$table->string('priority');
$table->string('sla');
$table->string('help_topic');
$table->string('max_open_ticket');
$table->string('collision_avoid');
$table->string('captcha');
$table->boolean('status');
$table->boolean('claim_response');
$table->boolean('assigned_ticket');
$table->boolean('answered_ticket');
$table->boolean('agent_mask');
$table->boolean('html');
$table->boolean('client_update');
$table->boolean('max_file_size');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_ticket');
}
class CreateSettingsTicketTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('settings_ticket', function (Blueprint $table) {
$table->increments('id');
$table->string('num_format');
$table->string('num_sequence');
$table->string('priority');
$table->string('sla');
$table->string('help_topic');
$table->string('max_open_ticket');
$table->string('collision_avoid');
$table->string('captcha');
$table->boolean('status');
$table->boolean('claim_response');
$table->boolean('assigned_ticket');
$table->boolean('answered_ticket');
$table->boolean('agent_mask');
$table->boolean('html');
$table->boolean('client_update');
$table->boolean('max_file_size');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('settings_ticket');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSlaPlanTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sla_plan', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('grace_period');
$table->string('admin_note');
$table->boolean('status');
$table->boolean('transient');
$table->boolean('ticket_overdue');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('sla_plan');
}
class CreateSlaPlanTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sla_plan', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('grace_period');
$table->string('admin_note');
$table->boolean('status');
$table->boolean('transient');
$table->boolean('ticket_overdue');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('sla_plan');
}
}

View File

@@ -3,33 +3,30 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTeamAssignAgentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('team_assign_agent', function(Blueprint $table)
{
$table->increments('id');
$table->integer('team_id')->unsigned()->nullable()->index('team_id');
$table->integer('agent_id')->unsigned()->nullable()->index('agent_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('team_assign_agent');
}
class CreateTeamAssignAgentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('team_assign_agent', function (Blueprint $table) {
$table->increments('id');
$table->integer('team_id')->unsigned()->nullable()->index('team_id');
$table->integer('agent_id')->unsigned()->nullable()->index('agent_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('team_assign_agent');
}
}

View File

@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTeamsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('teams', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->boolean('status');
$table->integer('team_lead')->unsigned()->nullable()->index('team_lead');
$table->boolean('assign_alert');
$table->string('admin_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('teams');
}
class CreateTeamsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('teams', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->boolean('status');
$table->integer('team_lead')->unsigned()->nullable()->index('team_lead');
$table->boolean('assign_alert');
$table->string('admin_notes');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('teams');
}
}

View File

@@ -3,36 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTemplateTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('template', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->boolean('status');
$table->string('template_set_to_clone');
$table->string('language');
$table->string('internal_note');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('template');
}
class CreateTemplateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('template', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->boolean('status');
$table->string('template_set_to_clone');
$table->string('language');
$table->string('internal_note');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('template');
}
}

View File

@@ -3,37 +3,34 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketAttachmentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_attachment', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->integer('thread_id')->unsigned()->nullable()->index('thread_id');
$table->string('size');
$table->string('type');
$table->string('poster');
$table->timestamps();
$table->binary('file', 65535)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_attachment');
}
class CreateTicketAttachmentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_attachment', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->integer('thread_id')->unsigned()->nullable()->index('thread_id');
$table->string('size');
$table->string('type');
$table->string('poster');
$table->timestamps();
$table->binary('file', 65535)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_attachment');
}
}

View File

@@ -3,35 +3,32 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketCollaboratorTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_collaborator', function(Blueprint $table)
{
$table->increments('id');
$table->boolean('isactive');
$table->integer('ticket_id')->unsigned()->nullable()->index('ticket_id');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->string('role');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_collaborator');
}
class CreateTicketCollaboratorTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_collaborator', function (Blueprint $table) {
$table->increments('id');
$table->boolean('isactive');
$table->integer('ticket_id')->unsigned()->nullable()->index('ticket_id');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->string('role');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_collaborator');
}
}

View File

@@ -3,34 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketFormDataTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_form_data', function(Blueprint $table)
{
$table->increments('id');
$table->integer('ticket_id')->unsigned()->nullable()->index('ticket_id');
$table->text('title', 65535);
$table->text('content', 65535);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_form_data');
}
class CreateTicketFormDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_form_data', function (Blueprint $table) {
$table->increments('id');
$table->integer('ticket_id')->unsigned()->nullable()->index('ticket_id');
$table->text('title', 65535);
$table->text('content', 65535);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_form_data');
}
}

View File

@@ -3,35 +3,32 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketPriorityTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_priority', function(Blueprint $table)
{
$table->increments('priority_id');
$table->string('priority');
$table->string('priority_desc');
$table->string('priority_color');
$table->boolean('priority_urgency');
$table->boolean('ispublic');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_priority');
}
class CreateTicketPriorityTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_priority', function (Blueprint $table) {
$table->increments('priority_id');
$table->string('priority');
$table->string('priority_desc');
$table->string('priority_color');
$table->boolean('priority_urgency');
$table->boolean('ispublic');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_priority');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketSourceTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_source', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('value');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_source');
}
class CreateTicketSourceTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_source', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('value');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_source');
}
}

View File

@@ -3,38 +3,35 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketStatusTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_status', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('state');
$table->integer('mode');
$table->string('message');
$table->integer('flags');
$table->integer('sort');
$table->string('properties');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_status');
}
class CreateTicketStatusTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_status', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('state');
$table->integer('mode');
$table->string('message');
$table->integer('flags');
$table->integer('sort');
$table->string('properties');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_status');
}
}

View File

@@ -3,40 +3,37 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketThreadTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_thread', function(Blueprint $table)
{
$table->increments('id');
$table->integer('ticket_id')->unsigned()->nullable()->index('ticket_id_2');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->string('poster');
$table->integer('source')->unsigned()->nullable()->index('source');
$table->boolean('is_internal');
$table->string('title');
$table->text('body', 65535);
$table->string('format');
$table->string('ip_address');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_thread');
}
class CreateTicketThreadTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_thread', function (Blueprint $table) {
$table->increments('id');
$table->integer('ticket_id')->unsigned()->nullable()->index('ticket_id_2');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->string('poster');
$table->integer('source')->unsigned()->nullable()->index('source');
$table->boolean('is_internal');
$table->string('title');
$table->text('body', 65535);
$table->string('format');
$table->string('ip_address');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('ticket_thread');
}
}

View File

@@ -3,60 +3,57 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tickets', function(Blueprint $table)
{
$table->increments('id');
$table->string('ticket_number');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->integer('dept_id')->unsigned()->nullable()->index('dept_id');
$table->integer('team_id')->unsigned()->nullable()->index('team_id');
$table->integer('priority_id')->unsigned()->nullable()->index('priority_id');
$table->integer('sla')->unsigned()->nullable()->index('sla');
$table->integer('help_topic_id')->unsigned()->nullable()->index('help_topic_id');
$table->integer('status')->unsigned()->nullable()->index('status');
$table->boolean('rating');
$table->boolean('ratingreply');
$table->integer('flags');
$table->integer('ip_address');
$table->integer('assigned_to')->unsigned()->nullable()->index('assigned_to');
$table->integer('lock_by');
$table->dateTime('lock_at')->nullable();
$table->integer('source')->unsigned()->nullable()->index('source');
$table->integer('isoverdue');
$table->integer('reopened');
$table->integer('isanswered');
$table->integer('html');
$table->integer('is_deleted');
$table->integer('closed');
$table->boolean('is_transferred');
$table->dateTime('transferred_at');
$table->dateTime('reopened_at')->nullable();
$table->dateTime('duedate')->nullable();
$table->dateTime('closed_at')->nullable();
$table->dateTime('last_message_at')->nullable();
$table->dateTime('last_response_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tickets');
}
class CreateTicketsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tickets', function (Blueprint $table) {
$table->increments('id');
$table->string('ticket_number');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->integer('dept_id')->unsigned()->nullable()->index('dept_id');
$table->integer('team_id')->unsigned()->nullable()->index('team_id');
$table->integer('priority_id')->unsigned()->nullable()->index('priority_id');
$table->integer('sla')->unsigned()->nullable()->index('sla');
$table->integer('help_topic_id')->unsigned()->nullable()->index('help_topic_id');
$table->integer('status')->unsigned()->nullable()->index('status');
$table->boolean('rating');
$table->boolean('ratingreply');
$table->integer('flags');
$table->integer('ip_address');
$table->integer('assigned_to')->unsigned()->nullable()->index('assigned_to');
$table->integer('lock_by');
$table->dateTime('lock_at')->nullable();
$table->integer('source')->unsigned()->nullable()->index('source');
$table->integer('isoverdue');
$table->integer('reopened');
$table->integer('isanswered');
$table->integer('html');
$table->integer('is_deleted');
$table->integer('closed');
$table->boolean('is_transferred');
$table->dateTime('transferred_at');
$table->dateTime('reopened_at')->nullable();
$table->dateTime('duedate')->nullable();
$table->dateTime('closed_at')->nullable();
$table->dateTime('last_message_at')->nullable();
$table->dateTime('last_response_at')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('tickets');
}
}

View File

@@ -3,31 +3,28 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTimeFormatTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('time_format', function(Blueprint $table)
{
$table->increments('id');
$table->string('format');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('time_format');
}
class CreateTimeFormatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('time_format', function (Blueprint $table) {
$table->increments('id');
$table->string('format');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('time_format');
}
}

View File

@@ -3,32 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTimezoneTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('timezone', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('location');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('timezone');
}
class CreateTimezoneTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('timezone', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('location');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('timezone');
}
}

View File

@@ -3,33 +3,30 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUserAssignOrganizationTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_assign_organization', function(Blueprint $table)
{
$table->increments('id');
$table->integer('org_id')->unsigned()->nullable()->index('org_id');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('user_assign_organization');
}
class CreateUserAssignOrganizationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_assign_organization', function (Blueprint $table) {
$table->increments('id');
$table->integer('org_id')->unsigned()->nullable()->index('org_id');
$table->integer('user_id')->unsigned()->nullable()->index('user_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('user_assign_organization');
}
}

View File

@@ -3,57 +3,54 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('user_name');
$table->string('first_name');
$table->string('last_name');
$table->boolean('gender');
$table->string('email')->unique();
$table->boolean('ban');
$table->string('password', 60);
$table->integer('active');
$table->string('ext');
$table->string('phone_number');
$table->string('mobile');
$table->text('agent_sign', 65535);
$table->string('account_type');
$table->string('account_status');
$table->integer('assign_group')->unsigned()->nullable()->index('assign_group_3');
$table->integer('primary_dpt')->unsigned()->nullable()->index('primary_dpt_2');
$table->string('agent_tzone');
$table->string('daylight_save');
$table->string('limit_access');
$table->string('directory_listing');
$table->string('vacation_mode');
$table->string('company');
$table->string('role');
$table->string('internal_note');
$table->string('profile_pic');
$table->string('remember_token', 100)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('user_name');
$table->string('first_name');
$table->string('last_name');
$table->boolean('gender');
$table->string('email')->unique();
$table->boolean('ban');
$table->string('password', 60);
$table->integer('active');
$table->string('ext');
$table->string('phone_number');
$table->string('mobile');
$table->text('agent_sign', 65535);
$table->string('account_type');
$table->string('account_status');
$table->integer('assign_group')->unsigned()->nullable()->index('assign_group_3');
$table->integer('primary_dpt')->unsigned()->nullable()->index('primary_dpt_2');
$table->string('agent_tzone');
$table->string('daylight_save');
$table->string('limit_access');
$table->string('directory_listing');
$table->string('vacation_mode');
$table->string('company');
$table->string('role');
$table->string('internal_note');
$table->string('profile_pic');
$table->string('remember_token', 100)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}

View File

@@ -3,33 +3,30 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateVersionCheckTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('version_check', function(Blueprint $table)
{
$table->increments('id');
$table->string('current_version');
$table->string('new_version');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('version_check');
}
class CreateVersionCheckTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('version_check', function (Blueprint $table) {
$table->increments('id');
$table->string('current_version');
$table->string('new_version');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('version_check');
}
}

View File

@@ -3,34 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateWidgetsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('widgets', function(Blueprint $table)
{
$table->integer('id', true);
$table->string('name', 30)->nullable();
$table->string('title', 50)->nullable();
$table->text('value', 65535)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('widgets');
}
class CreateWidgetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('widgets', function (Blueprint $table) {
$table->integer('id', true);
$table->string('name', 30)->nullable();
$table->string('title', 50)->nullable();
$table->text('value', 65535)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('widgets');
}
}

View File

@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToCannedResponseTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('canned_response', function(Blueprint $table)
{
$table->foreign('user_id', 'canned_response_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('canned_response', function(Blueprint $table)
{
$table->dropForeign('canned_response_ibfk_1');
});
}
class AddForeignKeysToCannedResponseTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('canned_response', function (Blueprint $table) {
$table->foreign('user_id', 'canned_response_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('canned_response', function (Blueprint $table) {
$table->dropForeign('canned_response_ibfk_1');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToDepartmentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('department', function(Blueprint $table)
{
$table->foreign('sla', 'department_ibfk_1')->references('id')->on('sla_plan')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('manager', 'department_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('department', function(Blueprint $table)
{
$table->dropForeign('department_ibfk_1');
$table->dropForeign('department_ibfk_2');
});
}
class AddForeignKeysToDepartmentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('department', function (Blueprint $table) {
$table->foreign('sla', 'department_ibfk_1')->references('id')->on('sla_plan')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('manager', 'department_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('department', function (Blueprint $table) {
$table->dropForeign('department_ibfk_1');
$table->dropForeign('department_ibfk_2');
});
}
}

View File

@@ -3,37 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToEmailsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('emails', function(Blueprint $table)
{
$table->foreign('department', 'emails_ibfk_1')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('priority', 'emails_ibfk_2')->references('priority_id')->on('ticket_priority')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('help_topic', 'emails_ibfk_3')->references('id')->on('help_topic')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('emails', function(Blueprint $table)
{
$table->dropForeign('emails_ibfk_1');
$table->dropForeign('emails_ibfk_2');
$table->dropForeign('emails_ibfk_3');
});
}
class AddForeignKeysToEmailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('emails', function (Blueprint $table) {
$table->foreign('department', 'emails_ibfk_1')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('priority', 'emails_ibfk_2')->references('priority_id')->on('ticket_priority')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('help_topic', 'emails_ibfk_3')->references('id')->on('help_topic')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('emails', function (Blueprint $table) {
$table->dropForeign('emails_ibfk_1');
$table->dropForeign('emails_ibfk_2');
$table->dropForeign('emails_ibfk_3');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToGroupAssignDepartmentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('group_assign_department', function(Blueprint $table)
{
$table->foreign('group_id', 'group_assign_department_ibfk_1')->references('id')->on('groups')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('department_id', 'group_assign_department_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('group_assign_department', function(Blueprint $table)
{
$table->dropForeign('group_assign_department_ibfk_1');
$table->dropForeign('group_assign_department_ibfk_2');
});
}
class AddForeignKeysToGroupAssignDepartmentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('group_assign_department', function (Blueprint $table) {
$table->foreign('group_id', 'group_assign_department_ibfk_1')->references('id')->on('groups')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('department_id', 'group_assign_department_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('group_assign_department', function (Blueprint $table) {
$table->dropForeign('group_assign_department_ibfk_1');
$table->dropForeign('group_assign_department_ibfk_2');
});
}
}

View File

@@ -3,43 +3,39 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToHelpTopicTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('help_topic', function(Blueprint $table)
{
$table->foreign('custom_form', 'help_topic_ibfk_1')->references('id')->on('custom_forms')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('department', 'help_topic_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('ticket_status', 'help_topic_ibfk_3')->references('id')->on('ticket_status')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('priority', 'help_topic_ibfk_4')->references('priority_id')->on('ticket_priority')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('sla_plan', 'help_topic_ibfk_5')->references('id')->on('sla_plan')->onUpdate('RESTRICT')->onDelete('RESTRICT');
$table->foreign('auto_assign', 'help_topic_ibfk_6')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('SET NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('help_topic', function(Blueprint $table)
{
$table->dropForeign('help_topic_ibfk_1');
$table->dropForeign('help_topic_ibfk_2');
$table->dropForeign('help_topic_ibfk_3');
$table->dropForeign('help_topic_ibfk_4');
$table->dropForeign('help_topic_ibfk_5');
$table->dropForeign('help_topic_ibfk_6');
});
}
class AddForeignKeysToHelpTopicTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('help_topic', function (Blueprint $table) {
$table->foreign('custom_form', 'help_topic_ibfk_1')->references('id')->on('custom_forms')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('department', 'help_topic_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('ticket_status', 'help_topic_ibfk_3')->references('id')->on('ticket_status')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('priority', 'help_topic_ibfk_4')->references('priority_id')->on('ticket_priority')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('sla_plan', 'help_topic_ibfk_5')->references('id')->on('sla_plan')->onUpdate('RESTRICT')->onDelete('RESTRICT');
$table->foreign('auto_assign', 'help_topic_ibfk_6')->references('id')->on('users')->onUpdate('RESTRICT')->onDelete('SET NULL');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('help_topic', function (Blueprint $table) {
$table->dropForeign('help_topic_ibfk_1');
$table->dropForeign('help_topic_ibfk_2');
$table->dropForeign('help_topic_ibfk_3');
$table->dropForeign('help_topic_ibfk_4');
$table->dropForeign('help_topic_ibfk_5');
$table->dropForeign('help_topic_ibfk_6');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToKbArticleRelationshipTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('kb_article_relationship', function(Blueprint $table)
{
$table->foreign('article_id', 'article_relationship_article_id_foreign')->references('id')->on('kb_article')->onUpdate('RESTRICT')->onDelete('RESTRICT');
$table->foreign('category_id', 'article_relationship_category_id_foreign')->references('id')->on('kb_category')->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('kb_article_relationship', function(Blueprint $table)
{
$table->dropForeign('article_relationship_article_id_foreign');
$table->dropForeign('article_relationship_category_id_foreign');
});
}
class AddForeignKeysToKbArticleRelationshipTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('kb_article_relationship', function (Blueprint $table) {
$table->foreign('article_id', 'article_relationship_article_id_foreign')->references('id')->on('kb_article')->onUpdate('RESTRICT')->onDelete('RESTRICT');
$table->foreign('category_id', 'article_relationship_category_id_foreign')->references('id')->on('kb_category')->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('kb_article_relationship', function (Blueprint $table) {
$table->dropForeign('article_relationship_article_id_foreign');
$table->dropForeign('article_relationship_category_id_foreign');
});
}
}

View File

@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToKbCommentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('kb_comment', function(Blueprint $table)
{
$table->foreign('article_id', 'comment_article_id_foreign')->references('id')->on('kb_article')->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('kb_comment', function(Blueprint $table)
{
$table->dropForeign('comment_article_id_foreign');
});
}
class AddForeignKeysToKbCommentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('kb_comment', function (Blueprint $table) {
$table->foreign('article_id', 'comment_article_id_foreign')->references('id')->on('kb_article')->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('kb_comment', function (Blueprint $table) {
$table->dropForeign('comment_article_id_foreign');
});
}
}

View File

@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToOrganizationTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('organization', function(Blueprint $table)
{
$table->foreign('head', 'organization_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('organization', function(Blueprint $table)
{
$table->dropForeign('organization_ibfk_1');
});
}
class AddForeignKeysToOrganizationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('organization', function (Blueprint $table) {
$table->foreign('head', 'organization_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('organization', function (Blueprint $table) {
$table->dropForeign('organization_ibfk_1');
});
}
}

View File

@@ -3,39 +3,35 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToSettingsSystemTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('settings_system', function(Blueprint $table)
{
$table->foreign('time_zone', 'settings_system_ibfk_1')->references('id')->on('timezone')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('time_farmat', 'settings_system_ibfk_2')->references('id')->on('time_format')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('date_format', 'settings_system_ibfk_3')->references('id')->on('date_format')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('date_time_format', 'settings_system_ibfk_4')->references('id')->on('date_time_format')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('settings_system', function(Blueprint $table)
{
$table->dropForeign('settings_system_ibfk_1');
$table->dropForeign('settings_system_ibfk_2');
$table->dropForeign('settings_system_ibfk_3');
$table->dropForeign('settings_system_ibfk_4');
});
}
class AddForeignKeysToSettingsSystemTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('settings_system', function (Blueprint $table) {
$table->foreign('time_zone', 'settings_system_ibfk_1')->references('id')->on('timezone')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('time_farmat', 'settings_system_ibfk_2')->references('id')->on('time_format')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('date_format', 'settings_system_ibfk_3')->references('id')->on('date_format')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('date_time_format', 'settings_system_ibfk_4')->references('id')->on('date_time_format')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('settings_system', function (Blueprint $table) {
$table->dropForeign('settings_system_ibfk_1');
$table->dropForeign('settings_system_ibfk_2');
$table->dropForeign('settings_system_ibfk_3');
$table->dropForeign('settings_system_ibfk_4');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTeamAssignAgentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('team_assign_agent', function(Blueprint $table)
{
$table->foreign('team_id', 'team_assign_agent_ibfk_1')->references('id')->on('teams')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('agent_id', 'team_assign_agent_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('team_assign_agent', function(Blueprint $table)
{
$table->dropForeign('team_assign_agent_ibfk_1');
$table->dropForeign('team_assign_agent_ibfk_2');
});
}
class AddForeignKeysToTeamAssignAgentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('team_assign_agent', function (Blueprint $table) {
$table->foreign('team_id', 'team_assign_agent_ibfk_1')->references('id')->on('teams')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('agent_id', 'team_assign_agent_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('team_assign_agent', function (Blueprint $table) {
$table->dropForeign('team_assign_agent_ibfk_1');
$table->dropForeign('team_assign_agent_ibfk_2');
});
}
}

View File

@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTeamsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('teams', function(Blueprint $table)
{
$table->foreign('team_lead', 'teams_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('teams', function(Blueprint $table)
{
$table->dropForeign('teams_ibfk_1');
});
}
class AddForeignKeysToTeamsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('teams', function (Blueprint $table) {
$table->foreign('team_lead', 'teams_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('teams', function (Blueprint $table) {
$table->dropForeign('teams_ibfk_1');
});
}
}

View File

@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTicketAttachmentTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_attachment', function(Blueprint $table)
{
$table->foreign('thread_id', 'ticket_attachment_ibfk_1')->references('id')->on('ticket_thread')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_attachment', function(Blueprint $table)
{
$table->dropForeign('ticket_attachment_ibfk_1');
});
}
class AddForeignKeysToTicketAttachmentTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_attachment', function (Blueprint $table) {
$table->foreign('thread_id', 'ticket_attachment_ibfk_1')->references('id')->on('ticket_thread')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_attachment', function (Blueprint $table) {
$table->dropForeign('ticket_attachment_ibfk_1');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTicketCollaboratorTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_collaborator', function(Blueprint $table)
{
$table->foreign('ticket_id', 'ticket_collaborator_ibfk_1')->references('id')->on('tickets')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('user_id', 'ticket_collaborator_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_collaborator', function(Blueprint $table)
{
$table->dropForeign('ticket_collaborator_ibfk_1');
$table->dropForeign('ticket_collaborator_ibfk_2');
});
}
class AddForeignKeysToTicketCollaboratorTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_collaborator', function (Blueprint $table) {
$table->foreign('ticket_id', 'ticket_collaborator_ibfk_1')->references('id')->on('tickets')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('user_id', 'ticket_collaborator_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_collaborator', function (Blueprint $table) {
$table->dropForeign('ticket_collaborator_ibfk_1');
$table->dropForeign('ticket_collaborator_ibfk_2');
});
}
}

View File

@@ -3,33 +3,29 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTicketFormDataTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_form_data', function(Blueprint $table)
{
$table->foreign('ticket_id', 'ticket_form_data_ibfk_1')->references('id')->on('tickets')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_form_data', function(Blueprint $table)
{
$table->dropForeign('ticket_form_data_ibfk_1');
});
}
class AddForeignKeysToTicketFormDataTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_form_data', function (Blueprint $table) {
$table->foreign('ticket_id', 'ticket_form_data_ibfk_1')->references('id')->on('tickets')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_form_data', function (Blueprint $table) {
$table->dropForeign('ticket_form_data_ibfk_1');
});
}
}

View File

@@ -3,37 +3,33 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTicketThreadTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_thread', function(Blueprint $table)
{
$table->foreign('ticket_id', 'ticket_thread_ibfk_1')->references('id')->on('tickets')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('user_id', 'ticket_thread_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('source', 'ticket_thread_ibfk_3')->references('id')->on('ticket_source')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_thread', function(Blueprint $table)
{
$table->dropForeign('ticket_thread_ibfk_1');
$table->dropForeign('ticket_thread_ibfk_2');
$table->dropForeign('ticket_thread_ibfk_3');
});
}
class AddForeignKeysToTicketThreadTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('ticket_thread', function (Blueprint $table) {
$table->foreign('ticket_id', 'ticket_thread_ibfk_1')->references('id')->on('tickets')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('user_id', 'ticket_thread_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('source', 'ticket_thread_ibfk_3')->references('id')->on('ticket_source')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('ticket_thread', function (Blueprint $table) {
$table->dropForeign('ticket_thread_ibfk_1');
$table->dropForeign('ticket_thread_ibfk_2');
$table->dropForeign('ticket_thread_ibfk_3');
});
}
}

View File

@@ -3,49 +3,45 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToTicketsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tickets', function(Blueprint $table)
{
$table->foreign('user_id', 'tickets_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('dept_id', 'tickets_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('team_id', 'tickets_ibfk_3')->references('id')->on('teams')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('priority_id', 'tickets_ibfk_4')->references('priority_id')->on('ticket_priority')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('sla', 'tickets_ibfk_5')->references('id')->on('sla_plan')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('help_topic_id', 'tickets_ibfk_6')->references('id')->on('help_topic')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('status', 'tickets_ibfk_7')->references('id')->on('ticket_status')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('source', 'tickets_ibfk_8')->references('id')->on('ticket_source')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('assigned_to', 'tickets_ibfk_9')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('tickets', function(Blueprint $table)
{
$table->dropForeign('tickets_ibfk_1');
$table->dropForeign('tickets_ibfk_2');
$table->dropForeign('tickets_ibfk_3');
$table->dropForeign('tickets_ibfk_4');
$table->dropForeign('tickets_ibfk_5');
$table->dropForeign('tickets_ibfk_6');
$table->dropForeign('tickets_ibfk_7');
$table->dropForeign('tickets_ibfk_8');
$table->dropForeign('tickets_ibfk_9');
});
}
class AddForeignKeysToTicketsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('tickets', function (Blueprint $table) {
$table->foreign('user_id', 'tickets_ibfk_1')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('dept_id', 'tickets_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('team_id', 'tickets_ibfk_3')->references('id')->on('teams')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('priority_id', 'tickets_ibfk_4')->references('priority_id')->on('ticket_priority')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('sla', 'tickets_ibfk_5')->references('id')->on('sla_plan')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('help_topic_id', 'tickets_ibfk_6')->references('id')->on('help_topic')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('status', 'tickets_ibfk_7')->references('id')->on('ticket_status')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('source', 'tickets_ibfk_8')->references('id')->on('ticket_source')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('assigned_to', 'tickets_ibfk_9')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('tickets', function (Blueprint $table) {
$table->dropForeign('tickets_ibfk_1');
$table->dropForeign('tickets_ibfk_2');
$table->dropForeign('tickets_ibfk_3');
$table->dropForeign('tickets_ibfk_4');
$table->dropForeign('tickets_ibfk_5');
$table->dropForeign('tickets_ibfk_6');
$table->dropForeign('tickets_ibfk_7');
$table->dropForeign('tickets_ibfk_8');
$table->dropForeign('tickets_ibfk_9');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToUserAssignOrganizationTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('user_assign_organization', function(Blueprint $table)
{
$table->foreign('org_id', 'user_assign_organization_ibfk_1')->references('id')->on('organization')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('user_id', 'user_assign_organization_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('user_assign_organization', function(Blueprint $table)
{
$table->dropForeign('user_assign_organization_ibfk_1');
$table->dropForeign('user_assign_organization_ibfk_2');
});
}
class AddForeignKeysToUserAssignOrganizationTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('user_assign_organization', function (Blueprint $table) {
$table->foreign('org_id', 'user_assign_organization_ibfk_1')->references('id')->on('organization')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('user_id', 'user_assign_organization_ibfk_2')->references('id')->on('users')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('user_assign_organization', function (Blueprint $table) {
$table->dropForeign('user_assign_organization_ibfk_1');
$table->dropForeign('user_assign_organization_ibfk_2');
});
}
}

View File

@@ -3,35 +3,31 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddForeignKeysToUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function(Blueprint $table)
{
$table->foreign('assign_group', 'users_ibfk_1')->references('id')->on('groups')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('primary_dpt', 'users_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function(Blueprint $table)
{
$table->dropForeign('users_ibfk_1');
$table->dropForeign('users_ibfk_2');
});
}
class AddForeignKeysToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->foreign('assign_group', 'users_ibfk_1')->references('id')->on('groups')->onUpdate('NO ACTION')->onDelete('RESTRICT');
$table->foreign('primary_dpt', 'users_ibfk_2')->references('id')->on('department')->onUpdate('NO ACTION')->onDelete('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('users', function (Blueprint $table) {
$table->dropForeign('users_ibfk_1');
$table->dropForeign('users_ibfk_2');
});
}
}

View File

@@ -3,39 +3,40 @@
use App\Model\helpdesk\Agent\Department;
use App\Model\helpdesk\Agent\Groups;
use App\Model\helpdesk\Agent\Teams;
use App\Model\helpdesk\Email\Smtp;
use App\Model\helpdesk\Manage\Help_topic;
use App\Model\helpdesk\Manage\Sla_plan;
use App\Model\helpdesk\Settings\Ticket;
use App\Model\helpdesk\Ticket\Ticket_Priority;
use App\Model\helpdesk\Ticket\Ticket_Status;
use App\Model\helpdesk\Utility\Date_format;
use App\Model\helpdesk\Utility\Date_time_format;
use App\Model\helpdesk\Utility\Languages;
use App\Model\helpdesk\Utility\MailboxProtocol;
use App\Model\helpdesk\Utility\Timezones;
use App\Model\helpdesk\Utility\Time_format;
use Illuminate\Database\Seeder;
use App\Model\helpdesk\Settings\Alert;
use App\Model\helpdesk\Settings\Company;
use App\Model\helpdesk\Settings\Email;
use App\Model\helpdesk\Settings\Responder;
use App\Model\helpdesk\Settings\System;
use App\Model\helpdesk\Ticket\Ticket_source;
use App\Model\helpdesk\Email\Smtp;
use App\Model\helpdesk\Utility\Version_Check;
use App\Model\helpdesk\Utility\Log_notification;
use App\Model\helpdesk\Settings\Ticket;
use App\Model\helpdesk\Theme\Widgets;
// Knowledge base
use App\Model\helpdesk\Ticket\Ticket_Priority;
use App\Model\helpdesk\Ticket\Ticket_source;
use App\Model\helpdesk\Ticket\Ticket_Status;
use App\Model\helpdesk\Utility\Date_format;
use App\Model\helpdesk\Utility\Date_time_format;
use App\Model\helpdesk\Utility\Languages;
use App\Model\helpdesk\Utility\Log_notification;
use App\Model\helpdesk\Utility\MailboxProtocol;
use App\Model\helpdesk\Utility\Time_format;
use App\Model\helpdesk\Utility\Timezones;
use App\Model\helpdesk\Utility\Version_Check;
use App\Model\kb\Settings;
// Knowledge base
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder {
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run() {
public function run()
{
/* Date time format */
$date_time_formats = [
@@ -47,7 +48,7 @@ class DatabaseSeeder extends Seeder {
'm-d-Y H:i:s',
'Y/m/d H:i:s',
'Y.m.d H:i:s',
'Y-m-d H:i:s'];
'Y-m-d H:i:s', ];
foreach ($date_time_formats as $date_time_format) {
Date_time_format::create(['format' => $date_time_format]);
@@ -62,203 +63,203 @@ class DatabaseSeeder extends Seeder {
'mm-dd-yyyy',
'yyyy/mm/dd',
'yyyy.mm.dd',
'yyyy-mm-dd'];
'yyyy-mm-dd', ];
foreach ($date_formats as $date_format) {
Date_format::create(['format' => $date_format]);
}
/* Time format */
Time_format::create(array('format' => 'H:i:s'));
Time_format::create(array('format' => 'H.i.s'));
Time_format::create(['format' => 'H:i:s']);
Time_format::create(['format' => 'H.i.s']);
/* Timezone */
$timezone = ['Pacific/Midway' => '(GMT-11:00) Midway Island',
'US/Samoa' => '(GMT-11:00) Samoa',
'US/Hawaii' => '(GMT-10:00) Hawaii',
'US/Alaska' => '(GMT-09:00) Alaska',
'US/Pacific' => '(GMT-08:00) Pacific Time (US & Canada)',
'America/Tijuana' => '(GMT-08:00) Tijuana',
'US/Arizona' => '(GMT-07:00) Arizona',
'US/Mountain' => '(GMT-07:00) Mountain Time (US & Canada)',
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
'America/Mazatlan' => '(GMT-07:00) Mazatlan',
'America/Mexico_City' => '(GMT-06:00) Mexico City',
'America/Monterrey' => '(GMT-06:00) Monterrey',
'Canada/Saskatchewan' => '(GMT-06:00) Saskatchewan',
'US/Central' => '(GMT-06:00) Central Time (US & Canada)',
'US/Eastern' => '(GMT-05:00) Eastern Time (US & Canada)',
'US/East-Indiana' => '(GMT-05:00) Indiana (East)',
'America/Bogota' => '(GMT-05:00) Bogota',
'America/Lima' => '(GMT-05:00) Lima',
'America/Caracas' => '(GMT-04:30) Caracas',
'Canada/Atlantic' => '(GMT-04:00) Atlantic Time (Canada)',
'America/La_Paz' => '(GMT-04:00) La Paz',
'America/Santiago' => '(GMT-04:00) Santiago',
'Canada/Newfoundland' => '(GMT-03:30) Newfoundland',
'America/Buenos_Aires' => '(GMT-03:00) Buenos Aires',
'Greenland' => '(GMT-03:00) Greenland',
'Atlantic/Stanley' => '(GMT-02:00) Stanley',
'Atlantic/Azores' => '(GMT-01:00) Azores',
'Atlantic/Cape_Verde' => '(GMT-01:00) Cape Verde Is.',
'Africa/Casablanca' => '(GMT) Casablanca',
'Europe/Dublin' => '(GMT) Dublin',
'Europe/Lisbon' => '(GMT) Lisbon',
'Europe/London' => '(GMT) London',
'Africa/Monrovia' => '(GMT) Monrovia',
'Europe/Amsterdam' => '(GMT+01:00) Amsterdam',
'Europe/Belgrade' => '(GMT+01:00) Belgrade',
'Europe/Berlin' => '(GMT+01:00) Berlin',
'Europe/Bratislava' => '(GMT+01:00) Bratislava',
'Europe/Brussels' => '(GMT+01:00) Brussels',
'Europe/Budapest' => '(GMT+01:00) Budapest',
'Europe/Copenhagen' => '(GMT+01:00) Copenhagen',
'Europe/Ljubljana' => '(GMT+01:00) Ljubljana',
'Europe/Madrid' => '(GMT+01:00) Madrid',
'Europe/Paris' => '(GMT+01:00) Paris',
'Europe/Prague' => '(GMT+01:00) Prague',
'Europe/Rome' => '(GMT+01:00) Rome',
'Europe/Sarajevo' => '(GMT+01:00) Sarajevo',
'Europe/Skopje' => '(GMT+01:00) Skopje',
'Europe/Stockholm' => '(GMT+01:00) Stockholm',
'Europe/Vienna' => '(GMT+01:00) Vienna',
'Europe/Warsaw' => '(GMT+01:00) Warsaw',
'Europe/Zagreb' => '(GMT+01:00) Zagreb',
'Europe/Athens' => '(GMT+02:00) Athens',
'Europe/Bucharest' => '(GMT+02:00) Bucharest',
'Africa/Cairo' => '(GMT+02:00) Cairo',
'Africa/Harare' => '(GMT+02:00) Harare',
'Europe/Helsinki' => '(GMT+02:00) Helsinki',
'Europe/Istanbul' => '(GMT+02:00) Istanbul',
'Asia/Jerusalem' => '(GMT+02:00) Jerusalem',
'Europe/Kiev' => '(GMT+02:00) Kyiv',
'Europe/Minsk' => '(GMT+02:00) Minsk',
'Europe/Riga' => '(GMT+02:00) Riga',
'Europe/Sofia' => '(GMT+02:00) Sofia',
'Europe/Tallinn' => '(GMT+02:00) Tallinn',
'Europe/Vilnius' => '(GMT+02:00) Vilnius',
'Asia/Baghdad' => '(GMT+03:00) Baghdad',
'Asia/Kuwait' => '(GMT+03:00) Kuwait',
'Africa/Nairobi' => '(GMT+03:00) Nairobi',
'Asia/Riyadh' => '(GMT+03:00) Riyadh',
'Asia/Tehran' => '(GMT+03:30) Tehran',
'Europe/Moscow' => '(GMT+04:00) Moscow',
'Asia/Baku' => '(GMT+04:00) Baku',
'Europe/Volgograd' => '(GMT+04:00) Volgograd',
'Asia/Muscat' => '(GMT+04:00) Muscat',
'Asia/Tbilisi' => '(GMT+04:00) Tbilisi',
'Asia/Yerevan' => '(GMT+04:00) Yerevan',
'Asia/Kabul' => '(GMT+04:30) Kabul',
'Asia/Karachi' => '(GMT+05:00) Karachi',
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
'Asia/Kolkata' => '(GMT+05:30) Kolkata',
'Asia/Kathmandu' => '(GMT+05:45) Kathmandu',
'Asia/Yekaterinburg' => '(GMT+06:00) Ekaterinburg',
'Asia/Almaty' => '(GMT+06:00) Almaty',
'Asia/Dhaka' => '(GMT+06:00) Dhaka',
'Asia/Novosibirsk' => '(GMT+07:00) Novosibirsk',
'Asia/Bangkok' => '(GMT+07:00) Bangkok',
'Asia/Ho_Chi_Minh' => '(GMT+07.00) Ho Chi Minh',
'Asia/Jakarta' => '(GMT+07:00) Jakarta',
'Asia/Krasnoyarsk' => '(GMT+08:00) Krasnoyarsk',
'Asia/Chongqing' => '(GMT+08:00) Chongqing',
'Asia/Hong_Kong' => '(GMT+08:00) Hong Kong',
'Asia/Kuala_Lumpur' => '(GMT+08:00) Kuala Lumpur',
'Australia/Perth' => '(GMT+08:00) Perth',
'Asia/Singapore' => '(GMT+08:00) Singapore',
'Asia/Taipei' => '(GMT+08:00) Taipei',
'Asia/Ulaanbaatar' => '(GMT+08:00) Ulaan Bataar',
'Asia/Urumqi' => '(GMT+08:00) Urumqi',
'Asia/Irkutsk' => '(GMT+09:00) Irkutsk',
'Asia/Seoul' => '(GMT+09:00) Seoul',
'Asia/Tokyo' => '(GMT+09:00) Tokyo',
'Australia/Adelaide' => '(GMT+09:30) Adelaide',
'Australia/Darwin' => '(GMT+09:30) Darwin',
'Asia/Yakutsk' => '(GMT+10:00) Yakutsk',
'Australia/Brisbane' => '(GMT+10:00) Brisbane',
'Australia/Canberra' => '(GMT+10:00) Canberra',
'Pacific/Guam' => '(GMT+10:00) Guam',
'Australia/Hobart' => '(GMT+10:00) Hobart',
'Australia/Melbourne' => '(GMT+10:00) Melbourne',
'Pacific/Port_Moresby' => '(GMT+10:00) Port Moresby',
'Australia/Sydney' => '(GMT+10:00) Sydney',
'Asia/Vladivostok' => '(GMT+11:00) Vladivostok',
'Asia/Magadan' => '(GMT+12:00) Magadan',
'Pacific/Auckland' => '(GMT+12:00) Auckland',
'Pacific/Fiji' => '(GMT+12:00) Fiji'];
'US/Samoa' => '(GMT-11:00) Samoa',
'US/Hawaii' => '(GMT-10:00) Hawaii',
'US/Alaska' => '(GMT-09:00) Alaska',
'US/Pacific' => '(GMT-08:00) Pacific Time (US & Canada)',
'America/Tijuana' => '(GMT-08:00) Tijuana',
'US/Arizona' => '(GMT-07:00) Arizona',
'US/Mountain' => '(GMT-07:00) Mountain Time (US & Canada)',
'America/Chihuahua' => '(GMT-07:00) Chihuahua',
'America/Mazatlan' => '(GMT-07:00) Mazatlan',
'America/Mexico_City' => '(GMT-06:00) Mexico City',
'America/Monterrey' => '(GMT-06:00) Monterrey',
'Canada/Saskatchewan' => '(GMT-06:00) Saskatchewan',
'US/Central' => '(GMT-06:00) Central Time (US & Canada)',
'US/Eastern' => '(GMT-05:00) Eastern Time (US & Canada)',
'US/East-Indiana' => '(GMT-05:00) Indiana (East)',
'America/Bogota' => '(GMT-05:00) Bogota',
'America/Lima' => '(GMT-05:00) Lima',
'America/Caracas' => '(GMT-04:30) Caracas',
'Canada/Atlantic' => '(GMT-04:00) Atlantic Time (Canada)',
'America/La_Paz' => '(GMT-04:00) La Paz',
'America/Santiago' => '(GMT-04:00) Santiago',
'Canada/Newfoundland' => '(GMT-03:30) Newfoundland',
'America/Buenos_Aires' => '(GMT-03:00) Buenos Aires',
'Greenland' => '(GMT-03:00) Greenland',
'Atlantic/Stanley' => '(GMT-02:00) Stanley',
'Atlantic/Azores' => '(GMT-01:00) Azores',
'Atlantic/Cape_Verde' => '(GMT-01:00) Cape Verde Is.',
'Africa/Casablanca' => '(GMT) Casablanca',
'Europe/Dublin' => '(GMT) Dublin',
'Europe/Lisbon' => '(GMT) Lisbon',
'Europe/London' => '(GMT) London',
'Africa/Monrovia' => '(GMT) Monrovia',
'Europe/Amsterdam' => '(GMT+01:00) Amsterdam',
'Europe/Belgrade' => '(GMT+01:00) Belgrade',
'Europe/Berlin' => '(GMT+01:00) Berlin',
'Europe/Bratislava' => '(GMT+01:00) Bratislava',
'Europe/Brussels' => '(GMT+01:00) Brussels',
'Europe/Budapest' => '(GMT+01:00) Budapest',
'Europe/Copenhagen' => '(GMT+01:00) Copenhagen',
'Europe/Ljubljana' => '(GMT+01:00) Ljubljana',
'Europe/Madrid' => '(GMT+01:00) Madrid',
'Europe/Paris' => '(GMT+01:00) Paris',
'Europe/Prague' => '(GMT+01:00) Prague',
'Europe/Rome' => '(GMT+01:00) Rome',
'Europe/Sarajevo' => '(GMT+01:00) Sarajevo',
'Europe/Skopje' => '(GMT+01:00) Skopje',
'Europe/Stockholm' => '(GMT+01:00) Stockholm',
'Europe/Vienna' => '(GMT+01:00) Vienna',
'Europe/Warsaw' => '(GMT+01:00) Warsaw',
'Europe/Zagreb' => '(GMT+01:00) Zagreb',
'Europe/Athens' => '(GMT+02:00) Athens',
'Europe/Bucharest' => '(GMT+02:00) Bucharest',
'Africa/Cairo' => '(GMT+02:00) Cairo',
'Africa/Harare' => '(GMT+02:00) Harare',
'Europe/Helsinki' => '(GMT+02:00) Helsinki',
'Europe/Istanbul' => '(GMT+02:00) Istanbul',
'Asia/Jerusalem' => '(GMT+02:00) Jerusalem',
'Europe/Kiev' => '(GMT+02:00) Kyiv',
'Europe/Minsk' => '(GMT+02:00) Minsk',
'Europe/Riga' => '(GMT+02:00) Riga',
'Europe/Sofia' => '(GMT+02:00) Sofia',
'Europe/Tallinn' => '(GMT+02:00) Tallinn',
'Europe/Vilnius' => '(GMT+02:00) Vilnius',
'Asia/Baghdad' => '(GMT+03:00) Baghdad',
'Asia/Kuwait' => '(GMT+03:00) Kuwait',
'Africa/Nairobi' => '(GMT+03:00) Nairobi',
'Asia/Riyadh' => '(GMT+03:00) Riyadh',
'Asia/Tehran' => '(GMT+03:30) Tehran',
'Europe/Moscow' => '(GMT+04:00) Moscow',
'Asia/Baku' => '(GMT+04:00) Baku',
'Europe/Volgograd' => '(GMT+04:00) Volgograd',
'Asia/Muscat' => '(GMT+04:00) Muscat',
'Asia/Tbilisi' => '(GMT+04:00) Tbilisi',
'Asia/Yerevan' => '(GMT+04:00) Yerevan',
'Asia/Kabul' => '(GMT+04:30) Kabul',
'Asia/Karachi' => '(GMT+05:00) Karachi',
'Asia/Tashkent' => '(GMT+05:00) Tashkent',
'Asia/Kolkata' => '(GMT+05:30) Kolkata',
'Asia/Kathmandu' => '(GMT+05:45) Kathmandu',
'Asia/Yekaterinburg' => '(GMT+06:00) Ekaterinburg',
'Asia/Almaty' => '(GMT+06:00) Almaty',
'Asia/Dhaka' => '(GMT+06:00) Dhaka',
'Asia/Novosibirsk' => '(GMT+07:00) Novosibirsk',
'Asia/Bangkok' => '(GMT+07:00) Bangkok',
'Asia/Ho_Chi_Minh' => '(GMT+07.00) Ho Chi Minh',
'Asia/Jakarta' => '(GMT+07:00) Jakarta',
'Asia/Krasnoyarsk' => '(GMT+08:00) Krasnoyarsk',
'Asia/Chongqing' => '(GMT+08:00) Chongqing',
'Asia/Hong_Kong' => '(GMT+08:00) Hong Kong',
'Asia/Kuala_Lumpur' => '(GMT+08:00) Kuala Lumpur',
'Australia/Perth' => '(GMT+08:00) Perth',
'Asia/Singapore' => '(GMT+08:00) Singapore',
'Asia/Taipei' => '(GMT+08:00) Taipei',
'Asia/Ulaanbaatar' => '(GMT+08:00) Ulaan Bataar',
'Asia/Urumqi' => '(GMT+08:00) Urumqi',
'Asia/Irkutsk' => '(GMT+09:00) Irkutsk',
'Asia/Seoul' => '(GMT+09:00) Seoul',
'Asia/Tokyo' => '(GMT+09:00) Tokyo',
'Australia/Adelaide' => '(GMT+09:30) Adelaide',
'Australia/Darwin' => '(GMT+09:30) Darwin',
'Asia/Yakutsk' => '(GMT+10:00) Yakutsk',
'Australia/Brisbane' => '(GMT+10:00) Brisbane',
'Australia/Canberra' => '(GMT+10:00) Canberra',
'Pacific/Guam' => '(GMT+10:00) Guam',
'Australia/Hobart' => '(GMT+10:00) Hobart',
'Australia/Melbourne' => '(GMT+10:00) Melbourne',
'Pacific/Port_Moresby' => '(GMT+10:00) Port Moresby',
'Australia/Sydney' => '(GMT+10:00) Sydney',
'Asia/Vladivostok' => '(GMT+11:00) Vladivostok',
'Asia/Magadan' => '(GMT+12:00) Magadan',
'Pacific/Auckland' => '(GMT+12:00) Auckland',
'Pacific/Fiji' => '(GMT+12:00) Fiji', ];
foreach ($timezone as $name => $location) {
Timezones::create(array('name' => $name, 'location' => $location));
Timezones::create(['name' => $name, 'location' => $location]);
}
/* Ticket status */
Ticket_status::create(array('name' => 'Open', 'state' => 'open', 'mode' => '3', 'message' => 'Ticket have been Reopened by', 'flags' => '0', 'sort' => '1', 'properties' => 'Open tickets.'));
Ticket_status::create(array('name' => 'Resolved', 'state' => 'closed', 'mode' => '1', 'message' => 'Ticket have been Resolved by', 'flags' => '0', 'sort' => '2', 'properties' => 'Resolved tickets.'));
Ticket_status::create(array('name' => 'Closed', 'state' => 'closed', 'mode' => '3', 'message' => 'Ticket have been Closed by', 'flags' => '0', 'sort' => '3', 'properties' => 'Closed tickets. Tickets will still be accessible on client and staff panels.'));
Ticket_status::create(array('name' => 'Archived', 'state' => 'archived', 'mode' => '3', 'message' => 'Ticket have been Archived by', 'flags' => '0', 'sort' => '4', 'properties' => 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.'));
Ticket_status::create(array('name' => 'Deleted', 'state' => 'deleted', 'mode' => '3', 'message' => 'Ticket have been Deleted by', 'flags' => '0', 'sort' => '5', 'properties' => 'Tickets queued for deletion. Not accessible on ticket queues.'));
Ticket_status::create(['name' => 'Open', 'state' => 'open', 'mode' => '3', 'message' => 'Ticket have been Reopened by', 'flags' => '0', 'sort' => '1', 'properties' => 'Open tickets.']);
Ticket_status::create(['name' => 'Resolved', 'state' => 'closed', 'mode' => '1', 'message' => 'Ticket have been Resolved by', 'flags' => '0', 'sort' => '2', 'properties' => 'Resolved tickets.']);
Ticket_status::create(['name' => 'Closed', 'state' => 'closed', 'mode' => '3', 'message' => 'Ticket have been Closed by', 'flags' => '0', 'sort' => '3', 'properties' => 'Closed tickets. Tickets will still be accessible on client and staff panels.']);
Ticket_status::create(['name' => 'Archived', 'state' => 'archived', 'mode' => '3', 'message' => 'Ticket have been Archived by', 'flags' => '0', 'sort' => '4', 'properties' => 'Tickets only adminstratively available but no longer accessible on ticket queues and client panel.']);
Ticket_status::create(['name' => 'Deleted', 'state' => 'deleted', 'mode' => '3', 'message' => 'Ticket have been Deleted by', 'flags' => '0', 'sort' => '5', 'properties' => 'Tickets queued for deletion. Not accessible on ticket queues.']);
/* Ticket priority */
Ticket_priority::create(array('priority' => 'low', 'priority_desc' => 'Low', 'priority_color' => 'info', 'priority_urgency' => '4', 'ispublic' => '1'));
Ticket_priority::create(array('priority' => 'normal', 'priority_desc' => 'Normal', 'priority_color' => 'info', 'priority_urgency' => '3', 'ispublic' => '1'));
Ticket_priority::create(array('priority' => 'high', 'priority_desc' => 'High', 'priority_color' => 'warning', 'priority_urgency' => '2', 'ispublic' => '1'));
Ticket_priority::create(array('priority' => 'emergency', 'priority_desc' => 'Emergency', 'priority_color' => 'danger', 'priority_urgency' => '1', 'ispublic' => '1'));
Ticket_priority::create(['priority' => 'low', 'priority_desc' => 'Low', 'priority_color' => 'info', 'priority_urgency' => '4', 'ispublic' => '1']);
Ticket_priority::create(['priority' => 'normal', 'priority_desc' => 'Normal', 'priority_color' => 'info', 'priority_urgency' => '3', 'ispublic' => '1']);
Ticket_priority::create(['priority' => 'high', 'priority_desc' => 'High', 'priority_color' => 'warning', 'priority_urgency' => '2', 'ispublic' => '1']);
Ticket_priority::create(['priority' => 'emergency', 'priority_desc' => 'Emergency', 'priority_color' => 'danger', 'priority_urgency' => '1', 'ispublic' => '1']);
/* SLA Plans */
Sla_plan::create(array('name' => 'Sla 1', 'grace_period' => '6 Hours', 'status' => '1'));
Sla_plan::create(array('name' => 'Sla 2', 'grace_period' => '12 Hours', 'status' => '1'));
Sla_plan::create(array('name' => 'Sla 3', 'grace_period' => '24 Hours', 'status' => '1'));
Sla_plan::create(['name' => 'Sla 1', 'grace_period' => '6 Hours', 'status' => '1']);
Sla_plan::create(['name' => 'Sla 2', 'grace_period' => '12 Hours', 'status' => '1']);
Sla_plan::create(['name' => 'Sla 3', 'grace_period' => '24 Hours', 'status' => '1']);
/* Mailbox protocol */
$mailbox = [
'IMAP' => '/imap',
'IMAP+SSL' => '/imap/ssl',
'IMAP+TLS' => '/imap/tls',
'IMAP+SSL/No-validate' => '/imap/ssl/novalidate-cert'];
'IMAP' => '/imap',
'IMAP+SSL' => '/imap/ssl',
'IMAP+TLS' => '/imap/tls',
'IMAP+SSL/No-validate' => '/imap/ssl/novalidate-cert', ];
foreach ($mailbox as $name => $value) {
MailboxProtocol::create(['name' => $name, 'value' => $value]);
}
/* Languages */
$languages = [
'English' => 'en',
'Italian' => 'it',
'German' => 'de',
'French' => 'fr',
'English' => 'en',
'Italian' => 'it',
'German' => 'de',
'French' => 'fr',
'Brazilian Portuguese' => 'pt_BR',
'Dutch' => 'nl',
'Spanish' => 'es',
'Norwegian' => 'nb_NO',
'Danish' => 'da'];
'Dutch' => 'nl',
'Spanish' => 'es',
'Norwegian' => 'nb_NO',
'Danish' => 'da', ];
foreach ($languages as $language => $locale) {
Languages::create(['name' => $language, 'locale' => $locale]);
}
/* Teams */
Teams::create(array('name' => 'Level 1 Support', 'status' => '1'));
Teams::create(array('name' => 'Level 2 Support'));
Teams::create(array('name' => 'Developer'));
Teams::create(['name' => 'Level 1 Support', 'status' => '1']);
Teams::create(['name' => 'Level 2 Support']);
Teams::create(['name' => 'Developer']);
/* Groups */
Groups::create(array('name' => 'Group A', 'group_status' => '1', 'can_create_ticket' => '1', 'can_edit_ticket' => '1', 'can_post_ticket' => '1', 'can_close_ticket' => '1', 'can_assign_ticket' => '1', 'can_transfer_ticket' => '1', 'can_delete_ticket' => '1', 'can_ban_email' => '1', 'can_manage_canned' => '1', 'can_view_agent_stats' => '1', 'department_access' => '1'));
Groups::create(array('name' => 'Group B', 'group_status' => '1', 'can_create_ticket' => '1', 'can_edit_ticket' => '0', 'can_post_ticket' => '0', 'can_close_ticket' => '1', 'can_assign_ticket' => '1', 'can_transfer_ticket' => '1', 'can_delete_ticket' => '1', 'can_ban_email' => '1', 'can_manage_canned' => '1', 'can_view_agent_stats' => '1', 'department_access' => '1'));
Groups::create(array('name' => 'Group C', 'group_status' => '1', 'can_create_ticket' => '0', 'can_edit_ticket' => '0', 'can_post_ticket' => '0', 'can_close_ticket' => '1', 'can_assign_ticket' => '0', 'can_transfer_ticket' => '0', 'can_delete_ticket' => '0', 'can_ban_email' => '0', 'can_manage_canned' => '0', 'can_view_agent_stats' => '0', 'department_access' => '0'));
Groups::create(['name' => 'Group A', 'group_status' => '1', 'can_create_ticket' => '1', 'can_edit_ticket' => '1', 'can_post_ticket' => '1', 'can_close_ticket' => '1', 'can_assign_ticket' => '1', 'can_transfer_ticket' => '1', 'can_delete_ticket' => '1', 'can_ban_email' => '1', 'can_manage_canned' => '1', 'can_view_agent_stats' => '1', 'department_access' => '1']);
Groups::create(['name' => 'Group B', 'group_status' => '1', 'can_create_ticket' => '1', 'can_edit_ticket' => '0', 'can_post_ticket' => '0', 'can_close_ticket' => '1', 'can_assign_ticket' => '1', 'can_transfer_ticket' => '1', 'can_delete_ticket' => '1', 'can_ban_email' => '1', 'can_manage_canned' => '1', 'can_view_agent_stats' => '1', 'department_access' => '1']);
Groups::create(['name' => 'Group C', 'group_status' => '1', 'can_create_ticket' => '0', 'can_edit_ticket' => '0', 'can_post_ticket' => '0', 'can_close_ticket' => '1', 'can_assign_ticket' => '0', 'can_transfer_ticket' => '0', 'can_delete_ticket' => '0', 'can_ban_email' => '0', 'can_manage_canned' => '0', 'can_view_agent_stats' => '0', 'department_access' => '0']);
/* Department */
Department::create(array('name' => 'Support', 'sla' => '1'));
Department::create(array('name' => 'Sales', 'sla' => '1'));
Department::create(array('name' => 'Operation', 'sla' => '1'));
Department::create(['name' => 'Support', 'sla' => '1']);
Department::create(['name' => 'Sales', 'sla' => '1']);
Department::create(['name' => 'Operation', 'sla' => '1']);
/* Helptopic */
help_topic::create(array('topic' => 'Support query', 'department' => '1', 'ticket_status' => '1', 'priority' => '2', 'sla_plan' => '1', 'ticket_num_format' => '1', 'status' => '1', 'type' => '1', 'auto_response' => '0'));
help_topic::create(array('topic' => 'Sales query', 'department' => '2', 'ticket_status' => '1', 'priority' => '2', 'sla_plan' => '1', 'ticket_num_format' => '1', 'status' => '0', 'type' => '1', 'auto_response' => '0'));
help_topic::create(array('topic' => 'Operational query', 'department' => '3', 'ticket_status' => '1', 'priority' => '2', 'sla_plan' => '1', 'ticket_num_format' => '1', 'status' => '0', 'type' => '1', 'auto_response' => '0'));
help_topic::create(['topic' => 'Support query', 'department' => '1', 'ticket_status' => '1', 'priority' => '2', 'sla_plan' => '1', 'ticket_num_format' => '1', 'status' => '1', 'type' => '1', 'auto_response' => '0']);
help_topic::create(['topic' => 'Sales query', 'department' => '2', 'ticket_status' => '1', 'priority' => '2', 'sla_plan' => '1', 'ticket_num_format' => '1', 'status' => '0', 'type' => '1', 'auto_response' => '0']);
help_topic::create(['topic' => 'Operational query', 'department' => '3', 'ticket_status' => '1', 'priority' => '2', 'sla_plan' => '1', 'ticket_num_format' => '1', 'status' => '0', 'type' => '1', 'auto_response' => '0']);
/* Daily notification log */
Log_notification::create(['log' => 'NOT-1']);
/* System complete settings */
Alert::create(['id' => '1', 'ticket_status' => '1', 'ticket_admin_email' => '1', 'assignment_status' => '1', 'assignment_assigned_status' => '1', 'assignment_assigned_agent' => '1']);
Company::create(array('id' => '1'));
Email::create(array('id' => '1', 'template' => 'default', 'email_fetching' => '1', 'notification_cron' => '1', 'all_emails' => '1', 'email_collaborator' => '1', 'attachment' => '1'));
Responder::create(array('id' => '1', 'new_ticket' => '1', 'agent_new_ticket' => '1'));
Company::create(['id' => '1']);
Email::create(['id' => '1', 'template' => 'default', 'email_fetching' => '1', 'notification_cron' => '1', 'all_emails' => '1', 'email_collaborator' => '1', 'attachment' => '1']);
Responder::create(['id' => '1', 'new_ticket' => '1', 'agent_new_ticket' => '1']);
// System::create(array('id' => '1', 'status' => '1', 'department' => '1', 'date_time_format' => '1', 'time_zone' => '32'));
Ticket::create(array('num_format' => '#ABCD 1234 1234567', 'num_sequence' => '0', 'collision_avoid' => '2', 'priority' => '1', 'sla' => '2', 'help_topic' => '1', 'status' => '1'));
Ticket::create(['num_format' => '#ABCD 1234 1234567', 'num_sequence' => '0', 'collision_avoid' => '2', 'priority' => '1', 'sla' => '2', 'help_topic' => '1', 'status' => '1']);
/* Ticket source */
Ticket_source::create(array('name' => 'web', 'value' => 'Web'));
Ticket_source::create(array('name' => 'email', 'value' => 'E-mail'));
Ticket_source::create(array('name' => 'agent', 'value' => 'Agent Panel'));
Ticket_source::create(['name' => 'web', 'value' => 'Web']);
Ticket_source::create(['name' => 'email', 'value' => 'E-mail']);
Ticket_source::create(['name' => 'agent', 'value' => 'Agent Panel']);
/* Mail configuration */
Smtp::create(array('id' => '1'));
Smtp::create(['id' => '1']);
/* Version check */
Version_Check::create(['id' => '1']);
/* System widgets */
@@ -285,5 +286,4 @@ class DatabaseSeeder extends Seeder {
/* Knowledge base setting */
Settings::create(['id' => 'id', 'pagination' => '10']);
}
}