Page MenuHomePhorge

2020_05_21_080131_create_transactions_table.php
No OneTemporary

Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None

2020_05_21_080131_create_transactions_table.php

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateTransactionsTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create(
'transactions',
static function (Blueprint $table) {
$table->string('id', 36)->primary();
$table->string('user_email')->nullable();
$table->string('object_id', 36)->index();
$table->string('object_type', 36)->index();
$table->string('type', 8);
$table->integer('amount')->nullable();
$table->string('description')->nullable();
$table->string('transaction_id', 36)->nullable()->index();
$table->timestamp('created_at')->useCurrent();
$table->timestamp('updated_at')->useCurrent();
$table->index(['object_id', 'object_type']);
}
);
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('transactions');
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Apr 24, 1:30 PM (14 h, 30 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9c/51/51597f6d944b1efc2628e1047209
Default Alt Text
2020_05_21_080131_create_transactions_table.php (1 KB)

Event Timeline