Skip to content

Commit

Permalink
Merge pull request #28 from dvicklund/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
dvicklund authored Mar 29, 2022
2 parents 22ef3b9 + e4e6d80 commit 6b476ef
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 10 deletions.
6 changes: 5 additions & 1 deletion src/migrations/2014_07_31_123201_create_metrics_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
{
Schema::create('metrics', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();

$table->foreignId('created_by')->unsigned()->nullable();
$table->string('name');
Expand Down
6 changes: 5 additions & 1 deletion src/migrations/2014_07_31_123204_create_categories_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
{
Schema::create('categories', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->foreignId('parent_id')->nullable()->index();
$table->integer('lft')->nullable()->index();
$table->integer('rgt')->nullable()->index();
Expand Down
6 changes: 5 additions & 1 deletion src/migrations/2014_07_31_123204_create_locations_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
{
Schema::create('locations', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->foreignId('parent_id')->nullable()->index();
$table->integer('lft')->nullable()->index();
$table->integer('rgt')->nullable()->index();
Expand Down
6 changes: 5 additions & 1 deletion src/migrations/2014_07_31_123213_create_inventory_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
{
Schema::create('inventories', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->softDeletes();

$table->foreignId('category_id')->unsigned()->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
{
Schema::create('inventory_skus', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->foreignId('inventory_id')->unsigned();
$table->string('code');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ public function up()
{
Schema::create('suppliers', function (Blueprint $table) {
$table->id();
$table->timestamps();

$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->string('name');
$table->string('code', 6)->unique();
$table->string('address')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public function up()
{
Schema::create('inventory_transactions', function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->foreignId('created_by')->unsigned()->nullable();
$table->foreignId('stock_id')->unsigned();
$table->string('name')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ public function up()
Schema::create('inventory_assemblies', function (Blueprint $table) {

$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->foreignId('inventory_id')->unsigned();
$table->foreignId('part_id')->unsigned();
$table->integer('quantity')->nullable();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ public function up()
Schema::create('inventory_bundles', function (Blueprint $table) {

$table->id();
$table->timestamps();
$table->timestamp('created_at')->useCurrent();
$table
->timestamp('updated_at')
->useCurrent()
->useCurrentOnUpdate();
$table->foreignId('inventory_id')->unsigned();
$table->foreignId('component_id')->unsigned();
$table->integer('quantity')->nullable();
Expand Down

0 comments on commit 6b476ef

Please sign in to comment.