1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

INA-6 | Cleaned some of the code, updated field type because of foreign key

This commit is contained in:
Nikola Cirkovic 2022-06-05 05:55:56 +02:00
parent d085595774
commit 809d4a6fbd

View File

@ -15,10 +15,10 @@ class CreatePurchaseOrderInvitationsTable extends Migration
{ {
Schema::create('purchase_order_invitations', function (Blueprint $table) { Schema::create('purchase_order_invitations', function (Blueprint $table) {
$table->id(); $table->id();
$table->unsignedInteger('company_id'); $table->unsignedInteger('company_id')->index();
$table->unsignedInteger('user_id'); $table->unsignedInteger('user_id');
$table->unsignedInteger('vendor_contact_id'); $table->unsignedInteger('vendor_contact_id')->unique();
$table->unsignedInteger('purchase_order_id')->index(); $table->unsignedBigInteger('purchase_order_id')->index()->unique();
$table->string('key')->index(); $table->string('key')->index();
$table->string('transaction_reference')->nullable(); $table->string('transaction_reference')->nullable();
$table->string('message_id')->nullable()->index(); $table->string('message_id')->nullable()->index();
@ -38,8 +38,6 @@ class CreatePurchaseOrderInvitationsTable extends Migration
$table->timestamps(6); $table->timestamps(6);
$table->softDeletes('deleted_at', 6); $table->softDeletes('deleted_at', 6);
$table->index(['deleted_at', 'purchase_order_id', 'company_id']);
$table->unique(['vendor_contact_id', 'purchase_order_id']);
}); });
} }