Added manager_id to DB, install script

This commit is contained in:
snipe
2013-12-12 01:12:42 -05:00
parent cdddbcf695
commit 3ec6df492d
2 changed files with 36 additions and 0 deletions
+2
View File
@@ -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');
});
}
}