/home/mip/mip/database/migrations/client/2016_05_20_010746_create_roles_table.php
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRolesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('roles', function (Blueprint $table) {
$table->engine = 'MYISAM';
$table->increments('id');
$table->string('name');
$table->string('display_name');
$table->string('description');
$table->timestamps();
});
DB::connection('qxcms')->table('roles')->truncate();
DB::connection('client')->table('roles')->insert([
[
'id'=>1,
'name' => 'Developer',
'display_name' => 'Developer',
'description' => 'Developer',
'created_at' => new \Carbon\Carbon,
'updated_at' => new \Carbon\Carbon
],
[
'id'=>2,
'name' => 'Admistrator',
'display_name' => 'Admistrator',
'description' => 'Admistrator',
'created_at' => new \Carbon\Carbon,
'updated_at' => new \Carbon\Carbon
],
[
'id'=>3,
'name' => 'Editor',
'display_name' => 'Editor',
'description' => 'Editor',
'created_at' => new \Carbon\Carbon,
'updated_at' => new \Carbon\Carbon
],
[
'id'=>4,
'name' => 'Field Officer',
'display_name' => 'Field Officer',
'description' => 'Field Officer',
'created_at' => new \Carbon\Carbon,
'updated_at' => new \Carbon\Carbon
]
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('roles');
}
}