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

CreateOrdersTable::up()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 23

Duplication

Lines 0
Ratio 0 %

Importance

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