Updates
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
@@ -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) {
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@@ -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) {
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user