gpt4 book ai didi

Mysql-Specified key was too long-不明白为什么?

转载 作者:行者123 更新时间:2023-11-29 05:51:58 25 4
gpt4 key购买 nike

<分区>

Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email))

在我做的每件事中都会无缘无故地弹出该错误...我确实创建了具有默认值的数据库并且它会弹出...复制 100% 工作代码时它会弹出...即使它得到修复也是有原因的。 . 就像用相同的细节再次创建相同的数据库 .. 我现在真的很厌烦它,因为它突然出现在 15 个不同的项目中 ... 不明白为什么它会弹出甚至 git 固定 ... 只是制作唯一的键或主要的,它有时会弹出,而其他的则不会! ...重新安装 Apache 就像 5 次获得最新版本.. 仍然弹出 100% 工作代码它可能弹出的逻辑原因是什么?

我所做的只是进行身份验证并将其迁移到数据库 (laravel)错误:

Illuminate\Database\QueryException : SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users' already exists (SQL: create table users (id int unsigned not null auto_increment primary key, name varchar(255) not null, email varchar(255) not null, email_verified_at timestamp null, password varchar(255) not null, remember_token varchar(100) null, created_at timestamp null, updated_at timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

于 C:\USER\供应商\laravel\framework\src\Illuminate\Database\Connection.php:664 660|//如果在尝试运行查询时发生异常,我们将格式化错误 661|//包含与 SQL 的绑定(bind)的消息,这将使此异常成为 662|//对开发人员更有帮助,而不仅仅是数据库的错误。 663| catch (异常 $e){

664| throw new QueryException( 665| $query, $this->prepareBindings($bindings), $e 666| ); 667| } 668|

异常跟踪:

1 PDOException::("SQLSTATE[42S01]: 基表或 View 已经 存在:1050 表“用户”已经存在”) C:\USER\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458

2 PDOStatement::execute() C:\USER\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458

block 引用

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com