2022_02_08_153922_create_user_profiles_table.php
1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUserProfilesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('user_profiles', function (Blueprint $table) {
            $table->id();
            $table->string('unionid')->default('')->comment('唯一标识');
            $table->string('last_visit_path')->default('')->comment('上次访问路径');
            $table->timestamp('last_visit_time')->nullable()->comment('上次访问时间');
            $table->string('registration_id')->default('')->comment('极光注册id');
            $table->string('alias_id')->default('')->comment('极光推送别名');
            $table->string('buy_number')->default(0)->comment('购买次数');
            $table->string('buy_amount')->default(0)->comment('消费金额');
            $table->timestamp('last_buy_time')->nullable()->comment('上次购买时间');
            $table->timestamps();
        });
    }
    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('user_profiles');
    }
}