Skip to content

Commit

Permalink
Use softDeletes on inventory_stocks and inventory_stock_movements
Browse files Browse the repository at this point in the history
… by default
  • Loading branch information
stevebauman committed Jun 8, 2015
1 parent 78e804f commit fa9ad56
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/migrations/2014_07_31_123213_create_inventory_tables.php
Expand Up @@ -14,6 +14,7 @@ public function up()
$table->increments('id');
$table->timestamps();
$table->softDeletes();

$table->integer('category_id')->unsigned()->nullable();
$table->integer('user_id')->unsigned()->nullable();
$table->integer('metric_id')->unsigned();
Expand All @@ -36,6 +37,7 @@ public function up()
Schema::create('inventory_stocks', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();

$table->integer('user_id')->unsigned()->nullable();
$table->integer('inventory_id')->unsigned();
Expand All @@ -46,8 +48,8 @@ public function up()
$table->string('bin')->nullable();

/*
* This allows only one inventory stock to be created
* on a single location
* This allows only one inventory stock
* to be created on a single location
*/
$table->unique(['inventory_id', 'location_id']);

Expand All @@ -67,6 +69,7 @@ public function up()
Schema::create('inventory_stock_movements', function (Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->softDeletes();

$table->integer('stock_id')->unsigned();
$table->integer('user_id')->unsigned()->nullable();
Expand Down

0 comments on commit fa9ad56

Please sign in to comment.