Файл: src/database/migrations/2016_04_14_191658_create_invoices_table.php
Строк: 59
<?php
use IlluminateDatabaseMigrationsMigration;
use IlluminateDatabaseSchemaBlueprint;
class CreateinvoicesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Invoices', function(Blueprint $table)
{
$table->increments('InvoiceID')->unsigned();
$table->integer('CompanyID',false,true);
$table->integer('CurrencyID',false,true);
$table->enum("Status",['Paid','Partially Paid','Closed','Invalid','On Hold','Pending']);
$table->string('Content',245)->nullable();
$table->string('ReferenceID',245);
$table->integer('Tax',false,true);
$table->decimal('TaxAmount',10,2);
$table->integer('DiscountMethod',false,true)->length(1)->nullable();
$table->integer('DiscountPercentage',false,true)->nullable();
$table->decimal('Discount',10,2)->nullable();
$table->decimal('SubTotal',10,2);
$table->decimal('Total',10,2);
$table->date('DueDate');
$table->timestamp('CreatedAt');
$table->timestamp('UpdatedAt');
$table->timestamp("DeletedAt")->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
DB::statement('SET FOREIGN_KEY_CHECKS=0;');
Schema::drop('Invoices');
DB::statement('SET FOREIGN_KEY_CHECKS=1;');
}
}