Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_03_16_100000_create_payments.php
Show All 18 Lines | public function up() | ||||
function (Blueprint $table) { | function (Blueprint $table) { | ||||
$table->string('id', 32)->primary(); | $table->string('id', 32)->primary(); | ||||
$table->string('wallet_id', 36); | $table->string('wallet_id', 36); | ||||
$table->string('status', 16); | $table->string('status', 16); | ||||
$table->integer('amount'); | $table->integer('amount'); | ||||
$table->text('description'); | $table->text('description'); | ||||
$table->string('provider', 16); | $table->string('provider', 16); | ||||
$table->string('type', 16); | $table->string('type', 16); | ||||
$table->timestamps(); | $table->timestamp('created_at')->useCurrent(); | ||||
$table->timestamp('updated_at')->useCurrent(); | |||||
$table->foreign('wallet_id')->references('id')->on('wallets')->onDelete('cascade'); | $table->foreign('wallet_id')->references('id')->on('wallets')->onDelete('cascade'); | ||||
} | } | ||||
); | ); | ||||
} | } | ||||
/** | /** | ||||
* Reverse the migrations. | * Reverse the migrations. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function down() | public function down() | ||||
{ | { | ||||
Schema::dropIfExists('payments'); | Schema::dropIfExists('payments'); | ||||
} | } | ||||
} | } |