Fixes for #759 - location heirarchy

This commit is contained in:
snipe
2015-05-04 02:50:42 -07:00
parent 5e7a4e8193
commit f463cd6c8d
7 changed files with 89 additions and 29 deletions
@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddParentIdToLocationsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('locations', function(Blueprint $table)
{
//
$table->integer('parent_id')->nullable()->default(NULL);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('locations', function(Blueprint $table)
{
//
$table->dropColumn('parent_id');
});
}
}