a416237796

114 经验值

@JellyBool 就是我在user表的生成器里加了这么多字段,运行创建数据表的命令的时候报错,然后错误信息里面显示的sql语句中tinity类型的字段全部被加上了主键的设置,导致数据表创建失败

就是这个表,运行命令后保存,我把sql语句复制出来,发现tinyInteger字段,默认被设置为主键,所以报错,求解


Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('username')->unique();
            $table->string('email')->unique();
            $table->string('telephone')->unique();
            $table->string('qq')->unique();
            $table->string('weixin')->unique();
            $table->string('sina')->unique();
            $table->string('password', 60);
            $table->string('name',50);
            $table->string('face');
            $table->tinyInteger('sex',1);
            $table->integer('age',3);
            $table->string('intro');
            $table->string('idcard');
            $table->string('bcard');
            $table->string('acard');
            $table->string('provincecode');
            $table->string('citycode');
            $table->string('areacode');
            $table->string('district _id');
            $table->string('address');
            $table->tinyInteger('is_check',1);
            $table->tinyInteger('is_look',1);
            $table->tinyInteger('status',1);
            $table->tinyInteger('type',1);
            $table->integer('login_counts',11);
            $table->timestamp('login_time');
            $table->string('login_ip');
            $table->timestamp('last_time');
            $table->string('last_ip');
            $table->decimal('total_money',11,2);
            $table->decimal('get_money',11,2);
            $table->decimal('could_money',11,2);
            $table->rememberToken();
            $table->timestamps();
        });

@openwrtmail 用的google浏览器,默认设置 刚看了下是选的推荐,没有勾选退出清理,而且我测试了下 其他网站能保存登录信息

登陆的记住两周没效果,昨天记住登陆了,今天还是需要登录