37 lines
944 B
PHP
37 lines
944 B
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
class CreateGifts extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('gifts', function (Blueprint $table) {
|
|
$table->increments('id');
|
|
$table->string('name', 50)->nullable()->comment('礼物名称');
|
|
$table->string('icon', 200)->nullable()->comment('礼物图标');
|
|
$table->decimal('price', 9,2)->default(0)->comment('礼物价格');
|
|
$table->string('unit', 20)->nullable()->comment('单位');
|
|
$table->timestamps();
|
|
$table->timestamp('deleted_at')->nullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('gifts');
|
|
}
|
|
}
|