2015-03-16 22:45:25 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
2017-01-30 17:05:31 +01:00
|
|
|
class AddQuotes extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::table('invoices', function ($table) {
|
|
|
|
$table->boolean('invoice_type_id')->default(0);
|
|
|
|
$table->unsignedInteger('quote_id')->nullable();
|
|
|
|
$table->unsignedInteger('quote_invoice_id')->nullable();
|
|
|
|
});
|
|
|
|
}
|
2015-03-16 22:45:25 +01:00
|
|
|
|
2017-01-30 17:05:31 +01:00
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::table('invoices', function ($table) {
|
|
|
|
$table->dropColumn('invoice_type_id');
|
|
|
|
$table->dropColumn('quote_id');
|
|
|
|
$table->dropColumn('quote_invoice_id');
|
|
|
|
});
|
|
|
|
}
|
2015-03-16 22:45:25 +01:00
|
|
|
}
|