1
0
Files
lkafu/database/migrations/2019_11_05_111227_create_payments_table.php
2020-08-06 14:45:56 +08:00

41 lines
765 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePaymentsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('payments', function(Blueprint $table)
{
$table->increments('id');
$table->integer('order_id')->unsigned()->index('order_id');
$table->string('trade_no', 20);
$table->string('type', 16);
$table->decimal('amount', 20)->unsigned();
$table->string('state', 16);
$table->dateTime('paid_at')->nullable();
$table->timestamps();
$table->text('source', 65535)->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('payments');
}
}