1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

INA-4 | Update migration | add missing licenses

This commit is contained in:
Nikola Cirkovic 2022-05-30 20:02:17 +02:00
parent 020cf10202
commit 92d797d35c
3 changed files with 23 additions and 2 deletions

View File

@ -1,5 +1,13 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Observers;

View File

@ -1,5 +1,13 @@
<?php
/**
* Invoice Ninja (https://invoiceninja.com).
*
* @link https://github.com/invoiceninja/invoiceninja source repository
*
* @copyright Copyright (c) 2022. Invoice Ninja LLC (https://invoiceninja.com)
*
* @license https://www.elastic.co/licensing/elastic-license
*/
namespace App\Policies;

View File

@ -104,6 +104,11 @@ class CreatePurchaseOrdersTable extends Migration
$table->datetime('last_viewed')->nullable();
$table->foreign('client_id')->references('id')->on('clients')->onDelete('cascade')->onUpdate('cascade');
$table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
$table->index(['company_id', 'deleted_at']);
$table->softDeletes();
$table->timestamps();