Changeset View
Changeset View
Standalone View
Standalone View
src/database/migrations/2020_04_21_100000_create_wallet_settings.php
Show All 15 Lines | class CreateWalletSettings extends Migration | ||||
{ | { | ||||
Schema::create( | Schema::create( | ||||
'wallet_settings', | 'wallet_settings', | ||||
function (Blueprint $table) { | function (Blueprint $table) { | ||||
$table->bigIncrements('id'); | $table->bigIncrements('id'); | ||||
$table->string('wallet_id'); | $table->string('wallet_id'); | ||||
$table->string('key'); | $table->string('key'); | ||||
$table->string('value'); | $table->string('value'); | ||||
$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'); | ||||
$table->unique(['wallet_id', 'key']); | $table->unique(['wallet_id', 'key']); | ||||
} | } | ||||
); | ); | ||||
} | } | ||||
/** | /** | ||||
Show All 9 Lines |