Completed
Push — main ( 121cb2...749ed9 )
by Emmanuel
01:12
created

CreateInvoicesTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 20
rs 9.6
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
/**
5
 * Author: Emmanuel Paul Mnzava
6
 * Twitter: @epmnzava
7
 * Github:https://github.com/dbrax/tigopesa-tanzania
8
 * Email: [email protected]
9
 * 
10
 */
11
12
use Illuminate\Support\Facades\Schema;
13
use Illuminate\Database\Schema\Blueprint;
14
use Illuminate\Database\Migrations\Migration;
15
16
class CreateInvoicesTable extends Migration
17
{
18
    /**
19
     * Run the migrations.
20
     *
21
     * @return void
22
     */
23
    public function up()
24
    {
25
        Schema::create('invoices', function (Blueprint $table) {
26
            $table->bigIncrements('id');
27
            $table->string('orderid'); //required attribute
28
            $table->integer('amount'); //required attribute
29
            $table->string('firstname'); //required attribute
30
            $table->string('lastname')->nullable();
31
            $table->string('mobile_number')->nullable();
32
            $table->string('email'); // required attribute
33
            $table->string('status')->default('pending');
34
            $table->string('address')->nullable();
35
            $table->date("date");
36
37
38
39
40
            $table->timestamps();
41
        });
42
    }
43
44
    /**
45
     * Reverse the migrations.
46
     *
47
     * @return void
48
     */
49
    public function down()
50
    {
51
        Schema::dropIfExists('order_details');
52
    }
53
}
54