|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
use Illuminate\Support\Facades\Schema; |
|
4
|
|
|
use Illuminate\Database\Schema\Blueprint; |
|
5
|
|
|
use Illuminate\Database\Migrations\Migration; |
|
6
|
|
|
|
|
7
|
|
|
class CreateInstamojoPaymentTable extends Migration |
|
8
|
|
|
{ |
|
9
|
|
|
/** |
|
10
|
|
|
* Run the migrations. |
|
11
|
|
|
* |
|
12
|
|
|
* @return void |
|
13
|
|
|
*/ |
|
14
|
|
|
public function up() |
|
15
|
|
|
{ |
|
16
|
|
|
Schema::create('instamojo_payment', function (Blueprint $table) { |
|
17
|
|
|
$table->engine = 'InnoDB'; |
|
18
|
|
|
$table->charset = 'utf8mb4'; |
|
19
|
|
|
$table->collation = 'utf8mb4_unicode_ci'; |
|
20
|
|
|
$table->increments('id'); |
|
21
|
|
|
$table->integer('user_id')->unsigned(); |
|
22
|
|
|
$table->foreign('user_id')->references('id')->on('users'); |
|
23
|
|
|
$table->string('buyer_email'); |
|
24
|
|
|
$table->string('buyer_name'); |
|
25
|
|
|
$table->string('buyer_phone'); |
|
26
|
|
|
$table->string('currency'); |
|
27
|
|
|
$table->string('amount'); |
|
28
|
|
|
$table->string('fees'); |
|
29
|
|
|
$table->string('longurl'); |
|
30
|
|
|
$table->string('payment_id'); |
|
31
|
|
|
$table->string('payment_request_id'); |
|
32
|
|
|
$table->string('purpose'); |
|
33
|
|
|
$table->string('shorturl')->nullable(); |
|
34
|
|
|
$table->string('request_status'); |
|
35
|
|
|
$table->string('payment_status'); |
|
36
|
|
|
$table->integer('created_by'); |
|
37
|
|
|
$table->integer('updated_by')->nullable(); |
|
38
|
|
|
$table->dateTime('deleted_at')->nullable(); |
|
39
|
|
|
$table->timestamps(); |
|
40
|
|
|
}); |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* Reverse the migrations. |
|
45
|
|
|
* |
|
46
|
|
|
* @return void |
|
47
|
|
|
*/ |
|
48
|
|
|
public function down() |
|
49
|
|
|
{ |
|
50
|
|
|
Schema::dropIfExists('instamojo_payment'); |
|
51
|
|
|
} |
|
52
|
|
|
} |
|
53
|
|
|
|