fixed recurring command #315
This commit is contained in:
54
database/migrations/2018_04_30_000000_add_parent_column.php
Normal file
54
database/migrations/2018_04_30_000000_add_parent_column.php
Normal 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');
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user