From ae47ebfcc64f6373f04c2e94207d6b4a0b549314 Mon Sep 17 00:00:00 2001 From: IceToast Date: Wed, 15 Dec 2021 13:07:51 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Added=20payment=20table=20m?= =?UTF-8?q?igration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...021_02_16_162655_create_payments_table.php | 3 +- ...1_12_15_120346_update_to_payment_table.php | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 database/migrations/2021_12_15_120346_update_to_payment_table.php diff --git a/database/migrations/2021_02_16_162655_create_payments_table.php b/database/migrations/2021_02_16_162655_create_payments_table.php index 185ce263..7c7d6f07 100644 --- a/database/migrations/2021_02_16_162655_create_payments_table.php +++ b/database/migrations/2021_02_16_162655_create_payments_table.php @@ -17,11 +17,12 @@ class CreatePaymentsTable extends Migration $table->uuid('id'); $table->foreignId('user_id')->references('id')->on('users'); $table->string('payment_id')->nullable(); - $table->string('payment_method')->nullable(); + $table->string('payer_id')->nullable();; $table->string('type')->nullable();; $table->string('status')->nullable();; $table->string('amount')->nullable();; $table->string('price')->nullable();; + $table->text('payer')->nullable();; $table->timestamps(); }); } diff --git a/database/migrations/2021_12_15_120346_update_to_payment_table.php b/database/migrations/2021_12_15_120346_update_to_payment_table.php new file mode 100644 index 00000000..81a4be8d --- /dev/null +++ b/database/migrations/2021_12_15_120346_update_to_payment_table.php @@ -0,0 +1,37 @@ +string('payment_method'); + $table->dropColumn('payer'); + $table->dropColumn('payer_id'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('payment', function (Blueprint $table) { + $table->dropColumn('payment_method'); + $table->string('payer_id')->nullable(); + $table->string('payer_id')->nullable(); + $table->text('payer')->nullable(); + }); + } +}