1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-22 01:11:34 +02:00

Fix for self host database migrations

This commit is contained in:
Hillel Coren 2016-11-29 21:05:31 +02:00
parent b97693508e
commit d9b611502e

View File

@ -38,15 +38,14 @@ class AddDocuments extends Migration {
$t->unsignedInteger('size');
$t->unsignedInteger('width')->nullable();
$t->unsignedInteger('height')->nullable();
$t->timestamps();
});
Schema::table('documents', function($t) {
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
$t->foreign('expense_id')->references('id')->on('expenses')->onDelete('cascade');
$t->unique( array('account_id','public_id') );
});
}