| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
- use Illuminate\Database\Migrations\Migration;
- use Illuminate\Database\Schema\Blueprint;
- class CreateMembersTable extends Migration {
- /**
- * Run the migrations.
- *
- * @return void
- */
- public function up()
- {
- Schema::create('members', function(Blueprint $table)
- {
- $table->increments('id');
- $table->string('phone', 100)->unique('phone')->comment('手机');
- $table->string('name', 50)->unique('username')->comment('昵称');
- $table->string('password')->comment('密码');
- $table->string('avatar')->nullable()->comment('头像');
- $table->string('remember_token', 150)->nullable()->comment('记住我');
- $table->char('uuid', 36);
- $table->softDeletes();
- $table->timestamps();
- $table->binary('status')->nullable()->comment('状态:1=正常,0=禁用');
- $table->decimal('amount', 25, 4)->default(0.0000)->comment('金额');
- $table->decimal('frozen_amount', 25, 4)->default(0.0000)->comment('冻结额度');
- $table->string('solt', 20)->nullable()->comment('盐');
- });
- }
- /**
- * Reverse the migrations.
- *
- * @return void
- */
- public function down()
- {
- Schema::drop('members');
- }
- }
|