Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_03_16_100000_create_payments.php
- This file was copied to src/database/migrations/2020_04_21_100000_create_wallet_settings.php.
Show All 10 Lines | class CreatePayments extends Migration | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function up() | public function up() | ||||
{ | { | ||||
Schema::create( | Schema::create( | ||||
'payments', | 'payments', | ||||
function (Blueprint $table) { | function (Blueprint $table) { | ||||
$table->string('id', 16)->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->timestamps(); | $table->timestamps(); | ||||
$table->foreign('wallet_id')->references('id')->on('wallets')->onDelete('cascade'); | $table->foreign('wallet_id')->references('id')->on('wallets')->onDelete('cascade'); | ||||
} | } | ||||
Show All 13 Lines |