1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 13:42:49 +01: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('size');
$t->unsignedInteger('width')->nullable(); $t->unsignedInteger('width')->nullable();
$t->unsignedInteger('height')->nullable(); $t->unsignedInteger('height')->nullable();
$t->timestamps(); $t->timestamps();
});
Schema::table('documents', function($t) {
$t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade'); $t->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
$t->foreign('user_id')->references('id')->on('users')->onDelete('cascade'); $t->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade'); $t->foreign('invoice_id')->references('id')->on('invoices')->onDelete('cascade');
$t->foreign('expense_id')->references('id')->on('expenses')->onDelete('cascade'); $t->foreign('expense_id')->references('id')->on('expenses')->onDelete('cascade');
$t->unique( array('account_id','public_id') ); $t->unique( array('account_id','public_id') );
}); });
} }