Fix for self host database migrations

This commit is contained in:
Hillel Coren 2016-11-29 21:05:54 +02:00
parent 30daf0c29f
commit a2798f75d2

View File

@ -29,16 +29,17 @@ class AddPageSize extends Migration
$table->unsignedInteger('account_id')->index();
$table->timestamps();
$table->softDeletes();
$table->string('name')->nullable();
$table->unsignedInteger('public_id')->index();
});
Schema::table('expense_categories', function ($table) {
$table->foreign('account_id')->references('id')->on('accounts')->onDelete('cascade');
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->unsignedInteger('public_id')->index();
$table->unique( array('account_id','public_id') );
});
Schema::table('expenses', function ($table) {
$table->unsignedInteger('expense_category_id')->nullable()->index();
});