feat: ✨ Added payment table migration
This commit is contained in:
parent
1e9850c594
commit
ae47ebfcc6
|
@ -17,11 +17,12 @@ class CreatePaymentsTable extends Migration
|
||||||
$table->uuid('id');
|
$table->uuid('id');
|
||||||
$table->foreignId('user_id')->references('id')->on('users');
|
$table->foreignId('user_id')->references('id')->on('users');
|
||||||
$table->string('payment_id')->nullable();
|
$table->string('payment_id')->nullable();
|
||||||
$table->string('payment_method')->nullable();
|
$table->string('payer_id')->nullable();;
|
||||||
$table->string('type')->nullable();;
|
$table->string('type')->nullable();;
|
||||||
$table->string('status')->nullable();;
|
$table->string('status')->nullable();;
|
||||||
$table->string('amount')->nullable();;
|
$table->string('amount')->nullable();;
|
||||||
$table->string('price')->nullable();;
|
$table->string('price')->nullable();;
|
||||||
|
$table->text('payer')->nullable();;
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class UpdateToPaymentTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('payment', function (Blueprint $table) {
|
||||||
|
$table->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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue