Added manager_id to DB, install script
This commit is contained in:
@@ -300,6 +300,7 @@ class AppCommand extends Command {
|
||||
// Prepare the user data array.
|
||||
$data = array_merge($this->userData, array(
|
||||
'activated' => 1,
|
||||
'manager_id' => NULL,
|
||||
'permissions' => array(
|
||||
'admin' => 1,
|
||||
'user' => 1,
|
||||
@@ -333,6 +334,7 @@ class AppCommand extends Command {
|
||||
'email' => 'john.doe@example.com',
|
||||
'password' => 'johndoe',
|
||||
'activated' => 1,
|
||||
'manager_id' => 1,
|
||||
);
|
||||
|
||||
// Create the user
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddManagerToUsersTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('users', function($table)
|
||||
{
|
||||
$table->integer('manager_id')->nullable()->default(NULL);
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('users', function($table)
|
||||
{
|
||||
$table->dropColumn('manager_id');
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user