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

@@ -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) {
//
});
}
}