12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- use Illuminate\Database\Schema\Blueprint;
- use Illuminate\Database\Migrations\Migration;
- /**
- * Class CreateContractsTable.
- */
- class CreateContractsTable extends Migration
- {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('contracts', function(Blueprint $table) {
- $table->increments('id');
- $table->integer('m_id')->index('m_id')->default('0')->comment('m_id');
- $table->integer('type')->index('type')->default('0')->comment('类型:1:初投,2:复投');
- $table->integer('status')->index('status')->default('1')->comment('1:广播中,2:成功,3:失败');
- $table->string('hash')->index('hash')->default('')->comment('交易hash');
- $table->text('broadcast_data')->comment('交易详情');
- $table->double('money',16,6)->default(0)->comment('投入金额');
- $table->string('error_msg')->default('')->comment('错误内容');
- $table->timestamps();
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('contracts');
- }
- }
|