This commit is contained in:
Manish Verma
2016-12-13 18:18:25 +05:30
parent fc98add11c
commit 2d8e640e9b
2314 changed files with 97798 additions and 75664 deletions

View File

@@ -22,6 +22,7 @@ class CreateUsersTable extends Migration
$table->boolean('ban');
$table->string('password', 60);
$table->integer('active');
$table->boolean('is_delete')->default(0);;
$table->string('ext');
$table->integer('country_code');
$table->string('phone_number');

View File

@@ -1,16 +1,16 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Version1079table extends Migration
{
class Version1079table extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
public function up() {
$current_version1 = \Config::get('app.version');
$current_version2 = explode(' ', $current_version1);
$current_version = $current_version2[1];
@@ -18,12 +18,17 @@ class Version1079table extends Migration
if ($settings_system != null) {
DB::table('settings_system')->insert(['version' => $current_version]);
DB::table('common_settings')
->insert(
['option_name' => 'enable_rtl', 'option_value' => ''],
['option_name' => 'user_set_ticket_status', 'status' => 1],
['option_name' => 'send_otp', 'status' => 0],
['option_name' => 'email_mandatory', 'status' => 1]
);
->insert(
['option_name' => 'enable_rtl', 'option_value' => ''], ['option_name' => 'user_set_ticket_status', 'status' => 1], ['option_name' => 'send_otp', 'status' => 0], ['option_name' => 'email_mandatory', 'status' => 1]
);
}
if (Schema::hasTable('common_settings')) {
$settings = DB::table('common_settings')->where('option_name', 'itil')->first();
if (!$settings) {
DB::table('common_settings')->insert(['option_name'=>'itil','status'=>'0']);
}
}
}
}

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJobsTable extends Migration
{

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFailedJobsTable extends Migration
{

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFieldValuesTable extends Migration
{

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFaveoMailsTable extends Migration
{

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFaveoQueuesTable extends Migration
{

View File

@@ -1,8 +1,8 @@
<?php
use App\Model\MailJob\MailService;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Model\MailJob\MailService;
class CreateMailServicesTable extends Migration
{
@@ -19,15 +19,17 @@ class CreateMailServicesTable extends Migration
$table->string('short_name');
$table->timestamps();
});
$mail = new MailService();
$services = ['smtp' => 'SMTP', 'mail' => 'Php Mail', 'sendmail' => 'Send Mail', 'mailgun' => 'Mailgun', 'mandrill' => 'Mandrill', 'log' => 'Log file'];
foreach ($services as $key => $value) {
$mail->create([
'name' => $value,
'short_name' => $key,
$services= ['smtp'=>'SMTP','mail'=>'Php Mail','sendmail'=>'Send Mail','mailgun'=>'Mailgun','mandrill'=>'Mandrill','log'=>'Log file'];
foreach($services as $key=>$value){
$mail->create([
'name'=>$value,
'short_name'=>$key,
]);
}
}
/**

View File

@@ -1,8 +1,8 @@
<?php
use App\Model\MailJob\QueueService;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Model\MailJob\QueueService;
class CreateQueueServicesTable extends Migration
{
@@ -20,20 +20,20 @@ class CreateQueueServicesTable extends Migration
$table->integer('status');
$table->timestamps();
});
$queue = new QueueService();
$services = ['sync' => 'Sync', 'database' => 'Database', 'beanstalkd' => 'Beanstalkd', 'sqs' => 'SQS', 'iron' => 'Iron', 'redis' => 'Redis'];
foreach ($services as $key => $value) {
$services = ['sync'=>'Sync','database'=>'Database','beanstalkd'=>'Beanstalkd','sqs'=>'SQS','iron'=>'Iron','redis'=>'Redis'];
foreach($services as $key=>$value){
$queue->create([
'name' => $value,
'short_name' => $key,
'status' => 0,
'name'=>$value,
'short_name'=>$key,
'status'=>0,
]);
}
$q = $queue->where('short_name', 'sync')->first();
if ($q) {
$q->status = 1;
$q->save();
$q = $queue->where('short_name','sync')->first();
if($q){
$q->status = 1;
$q->save();
}
}

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateConditionsTable extends Migration
{

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSocialMediaTable extends Migration
{

View File

@@ -1,7 +1,7 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserAdditionalInfosTable extends Migration
{

View File

@@ -1,17 +1,16 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AlterTicketSourceTable extends Migration {
class AlterTicketSourceTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
public function up() {
if (!Schema::hasColumn('ticket_source', 'css_class')) {
Schema::table('ticket_source', function (Blueprint $table) {
$table->string('css_class');
@@ -24,16 +23,15 @@ class AlterTicketSourceTable extends Migration
}
}
public function values()
{
public function values() {
return[
['name' => 'web', 'value' => 'Web', 'css_class' => 'fa fa-internet-explorer'],
['name' => 'email', 'value' => 'E-mail', 'css_class' => 'fa fa-envelope'],
['name' => 'agent', 'value' => 'Agent Panel', 'css_class' => 'fa fa-envelope'],
['name' => 'facebook', 'value' => 'Facebook', 'css_class' => 'fa fa-facebook'],
['name' => 'twitter', 'value' => 'Twitter', 'css_class' => 'fa fa-twitter'],
['name' => 'call', 'value' => 'Call', 'css_class' => 'fa fa-phone'],
['name' => 'chat', 'value' => 'Chat', 'css_class' => 'fa fa-comment'],
['name' => 'web', 'value' => 'Web', 'css_class' => 'fa fa-internet-explorer',],
['name' => 'email', 'value' => 'E-mail', 'css_class' => 'fa fa-envelope',],
['name' => 'agent', 'value' => 'Agent Panel', 'css_class' => 'fa fa-envelope',],
['name' => 'facebook', 'value' => 'Facebook', 'css_class' => 'fa fa-facebook',],
['name' => 'twitter', 'value' => 'Twitter', 'css_class' => 'fa fa-twitter',],
['name' => 'call', 'value' => 'Call', 'css_class' => 'fa fa-phone',],
['name' => 'chat', 'value' => 'Chat', 'css_class' => 'fa fa-comment',],
];
}
@@ -42,10 +40,10 @@ class AlterTicketSourceTable extends Migration
*
* @return void
*/
public function down()
{
public function down() {
Schema::table('ticket_source', function (Blueprint $table) {
//
});
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateApprovalTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('approval', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('status');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::drop('approval');
}
}

View File

@@ -1,35 +0,0 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateFollowUpTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('followup', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('status');
$table->string('condition');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
Schema::drop('followup');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFaveoMailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('faveo_mails', function (Blueprint $table) {
$table->increments('id');
$table->integer('email_id');
$table->string('drive');
$table->string('key');
$table->string('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('faveo_mails');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFaveoQueuesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('faveo_queues', function (Blueprint $table) {
$table->increments('id');
$table->integer('service_id');
$table->string('key');
$table->string('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('faveo_queues');
}
}

View File

@@ -0,0 +1,44 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Model\MailJob\MailService;
class CreateMailServicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('mail_services', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('short_name');
$table->timestamps();
});
$mail = new MailService();
$services= ['smtp'=>'SMTP','mail'=>'Php Mail','sendmail'=>'Send Mail','mailgun'=>'Mailgun','mandrill'=>'Mandrill','log'=>'Log file'];
foreach($services as $key=>$value){
$mail->create([
'name'=>$value,
'short_name'=>$key,
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('mail_services');
}
}

View File

@@ -0,0 +1,48 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
use App\Model\MailJob\QueueService;
class CreateQueueServicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('queue_services', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('short_name');
$table->integer('status');
$table->timestamps();
});
$queue = new QueueService();
$services = ['database'=>'Local Database','beanstalkd'=>'Beanstalkd','sqs'=>'SQS','iron'=>'Iron','redis'=>'Redis'];
$status = 0;
foreach($services as $key=>$value){
if($key==='database'){
$status=1;
}
$queue->create([
'name'=>$value,
'short_name'=>$key,
'status'=>$status,
]);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('queue_services');
}
}

View File

@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateConditionsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('conditions', function (Blueprint $table) {
$table->increments('id');
$table->string('job');
$table->string('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('conditions');
}
}

View File

@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSocialMediaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('social_media', function (Blueprint $table) {
$table->increments('id');
$table->string('provider');
$table->string('key');
$table->string('value');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('social_media');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserAdditionalInfosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('user_additional_infos', function (Blueprint $table) {
$table->increments('id');
$table->integer('owner');
$table->string('service');
$table->string('key');
$table->string('value')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('user_additional_infos');
}
}

View File

@@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AlterTicketSourceTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
if (!Schema::hasColumn('ticket_source', 'css_class')) {
Schema::table('ticket_source', function (Blueprint $table) {
$table->string('css_class');
});
}
DB::table('ticket_source')->delete();
$values = $this->values();
foreach ($values as $value) {
DB::table('ticket_source')->insert($value);
}
}
public function values() {
return[
['name' => 'web', 'value' => 'Web', 'css_class' => 'fa fa-internet-explorer',],
['name' => 'email', 'value' => 'E-mail', 'css_class' => 'fa fa-envelope',],
['name' => 'agent', 'value' => 'Agent Panel', 'css_class' => 'fa fa-envelope',],
['name' => 'facebook', 'value' => 'Facebook', 'css_class' => 'fa fa-facebook',],
['name' => 'twitter', 'value' => 'Twitter', 'css_class' => 'fa fa-twitter',],
];
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('ticket_source', function (Blueprint $table) {
//
});
}
}

View File

@@ -0,0 +1,47 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AlterTicketSourceTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
if (!Schema::hasColumn('ticket_source', 'css_class')) {
Schema::table('ticket_source', function (Blueprint $table) {
$table->string('css_class');
});
}
DB::table('ticket_source')->delete();
$values = $this->values();
foreach ($values as $value) {
DB::table('ticket_source')->insert($value);
}
}
public function values() {
return[
['name' => 'web', 'value' => 'Web', 'css_class' => 'fa fa-internet-explorer',],
['name' => 'email', 'value' => 'E-mail', 'css_class' => 'fa fa-envelope',],
['name' => 'agent', 'value' => 'Agent Panel', 'css_class' => 'fa fa-envelope',],
['name' => 'facebook', 'value' => 'Facebook', 'css_class' => 'fa fa-facebook',],
['name' => 'twitter', 'value' => 'Twitter', 'css_class' => 'fa fa-twitter',],
];
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down() {
Schema::table('ticket_source', function (Blueprint $table) {
//
});
}
}