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