Files
opensem/database/migrations/2020_03_11_222558_create_invoices_table.php
Ludovic CANDELLIER 36267139a1 [WIP] Setup of skeleton
2020-03-25 00:08:27 +01:00

48 lines
1.1 KiB
PHP

<?php
/**
* Laravel Schematics
*
* WARNING: removing @tag value will disable automated removal
*
* @package Laravel-schematics
* @author Maarten Tolhuijs <mtolhuys@protonmail.com>
* @url https://github.com/mtolhuys/laravel-schematics
* @tag laravel-schematics-invoices-model
*/
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateInvoicesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('invoices', static function (Blueprint $table) {
$table->increments('id');
$table->integer('user_id');
$table->boolean('status_id', true);
$table->decimal('subtotal', 10, 2);
$table->decimal('total', 10, 2);
$table->decimal('shipping', 10, 2);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('invoices');
}
}