fixed recurring command #315

This commit is contained in:
denisdulici
2018-05-01 19:00:33 +03:00
parent 26d25f41ae
commit 0a5136bd40
11 changed files with 90 additions and 26 deletions

View File

@ -0,0 +1,54 @@
<?php
use Illuminate\Database\Migrations\Migration;
class AddParentColumn extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('invoices', function ($table) {
$table->integer('parent_id')->default(0);
});
Schema::table('revenues', function ($table) {
$table->integer('parent_id')->default(0);
});
Schema::table('bills', function ($table) {
$table->integer('parent_id')->default(0);
});
Schema::table('payments', function ($table) {
$table->integer('parent_id')->default(0);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('invoices', function ($table) {
$table->dropColumn('parent_id');
});
Schema::table('revenues', function ($table) {
$table->dropColumn('parent_id');
});
Schema::table('bills', function ($table) {
$table->dropColumn('parent_id');
});
Schema::table('payments', function ($table) {
$table->dropColumn('parent_id');
});
}
}