update v1.0.5

This commit is contained in:
sujitprasad
2016-01-25 20:45:35 +05:30
parent 0b8ebb9c70
commit e7149e34e4
252 changed files with 9008 additions and 3152 deletions

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,33 @@
<?php
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');
}
}

View File

@@ -0,0 +1,33 @@
<?php
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');
}
}

View File

@@ -0,0 +1,46 @@
<?php
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');
}
}

View File

@@ -0,0 +1,58 @@
<?php
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('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

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,48 @@
<?php
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');
}
}

View File

@@ -0,0 +1,47 @@
<?php
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');
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_article');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,62 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,42 @@
<?php
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');
}
}

View File

@@ -0,0 +1,45 @@
<?php
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');
$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

@@ -0,0 +1,47 @@
<?php
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->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

@@ -0,0 +1,49 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,40 @@
<?php
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');
}
}

View File

@@ -0,0 +1,42 @@
<?php
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');
}
}

View File

@@ -0,0 +1,60 @@
<?php
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->integer('flags');
$table->integer('ip_address');
$table->integer('assigned_to')->unsigned()->nullable()->index('assigned_to');
$table->integer('lock_by');
$table->integer('lock_at');
$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

@@ -0,0 +1,33 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,59 @@
<?php
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->string('agent_sign');
$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

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,45 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,41 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,51 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,37 @@
<?php
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');
});
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('canned_response');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,33 @@
<?php
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');
}
}

View File

@@ -0,0 +1,33 @@
<?php
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');
}
}

View File

@@ -0,0 +1,46 @@
<?php
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');
}
}

View File

@@ -0,0 +1,58 @@
<?php
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('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

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,48 @@
<?php
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');
}
}

View File

@@ -0,0 +1,47 @@
<?php
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->boolean('auto_assign');
$table->boolean('auto_response');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('help_topic');
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
$table->boolean('status');
$table->boolean('type');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_article');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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', 16777215);
$table->boolean('status');
$table->integer('parent');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_category');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('kb_pages');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,34 @@
<?php
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');
}
}

View File

@@ -0,0 +1,36 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,62 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,42 @@
<?php
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');
}
}

View File

@@ -0,0 +1,45 @@
<?php
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');
$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

@@ -0,0 +1,47 @@
<?php
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->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

@@ -0,0 +1,49 @@
<?php
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');
}
}

View File

@@ -0,0 +1,39 @@
<?php
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');
}
}

View File

@@ -0,0 +1,35 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

View File

@@ -0,0 +1,38 @@
<?php
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');
}
}

Some files were not shown because too many files have changed in this diff Show More