Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | public function up() |
||
15 | { |
||
16 | Schema::create('inventory_stock_movements', function (Blueprint $table) { |
||
17 | $table->bigIncrements('id'); |
||
18 | $table->unsignedBigInteger('stock_id'); |
||
19 | $table->integer('before')->default(0); |
||
20 | $table->integer('after')->default(0); |
||
21 | $table->decimal('cost', 8, 2)->default(0)->nullable(); |
||
22 | $table->string('reason')->nullable(); |
||
23 | |||
24 | |||
25 | $table->timestamps(); |
||
26 | |||
27 | $table->foreign('stock_id') |
||
28 | ->references('id') |
||
29 | ->on('inventory_stocks') |
||
30 | ->onDelete('cascade'); |
||
31 | }); |
||
44 |